Home | Advertising Info5 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Thursday, April 25, 2024  

  Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Advanced
 PowerASP Code Help Area : Classic ASP - Advanced
Subject Info: cookie set and read A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
loganbest
Newbie
Newbie
Avatar

Joined: September/25/2005
Location: United States
Online Status: Offline
Info: 1
Added: 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 info by loganbest
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area

   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.

Active Server Pages ASP ASP.NET .aspx .ascx Web HTML Developer Internet Microsoft Web Services Visual Studio .NET CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com