i have an asp page with a form: the username field must have the last user who connected ( saved using cookie) When i press the "cancel " botton of the form this username should disappear and appear again once i close and open the browser again I have a problem doing it: I wrote : <form name="nuovo" method="post" action="B.asp" onSubmit="return control(nickname.value,password.value); "> <H2>Insert username</H2> <p ><input type="text" name="nick" value="<%iResponse.write(Request.cookies("lastuser"))%> "> </p> <H2>insert password</H2> <p ><input type="password" name="password" value=""> </p> <p ><input type="Submit" name="create" value="Log!"> <input type="reset" value="Cancella"> </p> </form> done like this it doesn't cancel the nick value once i press cancella if i write in che nick value: value="<%if(Request.Form("cancel")=="Cancella") {Response.write(Request.cookies("lastuser"))}%> "> and in the cancel botton: <input type="reset" name= "cancel" value="Cancella"> it always puts it empty Can anyone help me???? thanks!! ps. I am writing on ASP pages using javascript
It seems you are telling the script to actually SHOW the cookie if some1 press cancel. Change to: By the way I don't remember how the reset button is treated... if it works like you think, this should work.