Here is the function
[CODE=javascript]function setCookie()
{
cookieName = "dataCookie ";
var YouEntered
if(document.coo kie != document.cookie )
{index = document.cookie .indexOf(cookie Name);}
else
{index = -1;}
if (index == -1)
{
YouEntered=docu ment.getElement ById("userName" ).value;
document.cookie =cookie_name+"= "+YouEntere d+"; expires=Monday, 04-Apr-2020 05:00:00 GMT";
}
}
[/CODE]Here is the code in the default.htm
[HTML]<p>
<INPUT type="button" NAME="memberLog inButton" VALUE="Member Login" Id="submitButto n"
onclick="return validate(); setCookie()">
</p[/HTML]
[CODE=javascript]function setCookie()
{
cookieName = "dataCookie ";
var YouEntered
if(document.coo kie != document.cookie )
{index = document.cookie .indexOf(cookie Name);}
else
{index = -1;}
if (index == -1)
{
YouEntered=docu ment.getElement ById("userName" ).value;
document.cookie =cookie_name+"= "+YouEntere d+"; expires=Monday, 04-Apr-2020 05:00:00 GMT";
}
}
[/CODE]Here is the code in the default.htm
[HTML]<p>
<INPUT type="button" NAME="memberLog inButton" VALUE="Member Login" Id="submitButto n"
onclick="return validate(); setCookie()">
</p[/HTML]
Comment