Hello everybody,
I had hard time to set cookie by using lps3.2 release.
I have a laszlo method as given below.
<method event="onclick">
<![CDATA[
LzBrowser.loadJS("document.cookie='NoticePage=xyz'");
// wait 1/2 sec for the cookie to be set before changing the page
LzTimer.resetTimer(new LzDelegate(this, 'opendefault'), 500);
]]>
</method>
<![CDATA[
LzBrowser.loadJS("document.cookie='NoticePage=xyz'");
// wait 1/2 sec for the cookie to be set before changing the page
LzTimer.resetTimer(new LzDelegate(this, 'opendefault'), 500);
]]>
</method>
<method name="opendefault">
LzBrowser.loadJS("top.location='Default.html'");
</method>
from my _javascript_ I am trying to retrive the same cookie but there is no cookie
set at the browser side.
<script type="text/_javascript_">
function getCookie(name)
{
var prefix = name + "="
var cookieStartIndex = document.cookie.indexOf(prefix)
if (cookieStartIndex == -1)
return null
var cookieEndIndex =
document.cookie.indexOf(";", cookieStartIndex +
prefix.length)
if (cookieEndIndex == -1)
cookieEndIndex = document.cookie.length
return unescape(document.cookie.substring(cookieStartIndex +
prefix.length, cookieEndIndex))
}
function window.onload(){
var noticePage = getCookie("'NoticePage");
alert(" Document Cookies are... \n" +
document.cookie);
if (NoticeCode == null){
document.all.contentView.src ="";
document.all.contentView.style.visibility = "visible";
}
}
</script>
is there any bug with lps 3.2 release because the above code is working fine with lps 3.1 release.
So Is there any other way to do the same?
Thanks in Advance
Chandra
Yahoo! India Answers: Share what you know. Learn something new Click here
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
_______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user
