November 22, 201015 yr Hello, I need alittle help finishing my 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 05:00:00 GMT"; } } </SCRIPT> <FORM NAME="cf"> Enter A Word: <INPUT TYPE="text" NAME="cfd" size="20"> <INPUT TYPE="button" Value="Set to Cookie" onClick="putCookie()"> </FORM> I can't figure out how to make a reset button to delete the cookie so a new text can be stored in the box. Also is there any specific I need to type in if I want the box only to save Links?
Create an account or sign in to comment