Home | Advertising Info4 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Friday, May 10, 2024  

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Advanced
 PowerASP Code Help Area : Classic ASP - Advanced
Subject Topic: cookie set and read Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
loganbest
Newbie
Newbie
Avatar

Joined: September/25/2005
Location: United States
Online Status: Offline
Posts: 1
Posted: September/25/2005 at 11:07pm | IP Logged Quote loganbest

does anyone know how to set a cookie when the style is selected, then read the cookie on page load and set the users style that they selected and saved in the cookie.

Here in the script:
 
<!--#include file="header.inc"-->
<%
strStyle = request("style")
if len(strStyle) = "0" then strStyle = "mjhs"

%>
<link rel="stylesheet" type="text/css" href="<%=strStyle%>.css" />
<center>
Style Changer:<br>
If you think that the website is "dull" with the grey, <i>you</i> can now change it!<br>
Just simply click on one of the links below to change the color accordingly.<br><br>
<form name="styleform" id="styleform" method="post" action="style.asp">
<select name="style" id="style" onchange="document.forms.styleform.submit();">
    <option value="mjhs" <% if strStyle = "mjhs" then %> selected <% end if %>>Gray</option>
    <option value="tan" <% if strStyle = "tan" then %> selected <% end if %>>Tan</option>
    <option value="yellow" <% if strStyle = "yellow" then %> selected <% end if %>>Yellow</option>
%>
</select>

<Br>Note: There more colors coming available
Back to Top View loganbest's Profile Search for other posts by loganbest
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com