| free hosting image hosting hosting reseller online album e-shop famous people | ||
![]() ![]() |
||
All cookie-enabled browsers.
Open test pageAfter selecting a default page, you may wish to experiment with other options.
Delete CookieNow open the test page again - the option page is back.
Now add this to your body section:
In both sections, simply modify the urls and associated information to suit.
The first 3 are self-explanatory, but the function getCookieVal is a little less obvious.GetCookie SetCookie DeleteCookie getCookieVal
<input type=radio name="frames"
onClick="SetCookie('page', this.name, exp);"> Frames Page
where:
When the desired option is selected, the cookie is set.page is the name of the cookie this.name is the value assigned to it - eg: frames exp is the current date (for expiry setting)
To change the expiry date of the cookie, modify this line:the cookie value is read the selected page is loaded in the same window.
var expDays = 365;
var defpage = GetCookie('page');
A switch routine is then used to determine the name of the default page:
if (defpage != null) {
switch (defpage) {
case 'frames' : url = 'framesindex.html';
break;
case 'ebutton' : url = 'emailbutton.html';
break;
case 'test' : url = 'testpage.html';
break;
case 'music' : url = 'wma2.html';
break;
}
The page name is then assigned to the variable url.
window.location.href = url;
And use this for the link on that page:
This will make the options page accessible again.