Hello,
I have problem in setting 'current page' name thro cookie.
I have web pages comprising of 3 frames (header, leftmenu & mainpage). Now all my main body pages (s1t1p1.
html, s2t1p1.
html etc) are all include with something like
- Code: Select all
<body ... onload="javascript: setCookie('k216cr1','s1t1p1.html')
and in <head> of each page
- Code: Select all
function setCookie(name, value) {
var curCookie = name + "=" + escape(value) + ";" ;
document.cookie = curCookie;
}
For some reason, I realised this is not set. The same is working if I use this s1t1p1.
html & others as single pages (not part of frame).
Also, works if I put it 'onclick' of each link like (from header, leftmenu etc):
- Code: Select all
<a target="mainpage" onclick="setCookie('k216cr1','s1t1p1.html')" href="s1t1p1.html">Name</a>
Will body onload won't work if used within frame? or... can anyone advice me why it was not working & How to fix it?
Thanks
karl