View Single Post
Old 11-19-2008, 08:26 PM  
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
PHP Code:
<SCRIPT LANGUAGE="JavaScript">

cookie_name "dataCookie";
var 
YouEntered;

function 
putCookie() {

if(
document.cookie != document.cookie
{
index document.cookie.indexOf(cookie_name);}
else 
index = -1;}

if (
index == -1)
{
YouEntered=document.cf.cfd.value;
document.cookie=cookie_name+"="+YouEntered+"; expires=Monday, 04-Apr-2010 5:00:00 GMT";
}

}
</SCRIPT>



<FORM NAME="cf">

<INPUT TYPE="text" NAME="cfd" size="20">
<INPUT TYPE="button" Value="Set to Cookie" 
onClick="putCookie()">

</FORM> 
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote