I am trying to use a javascript cookie ( www.acky.net/tutorials/javascripts/cookies/ ) to save the user name and domain for a webmail service i offer.

I have tried different ways to add the code to save fields but i can't get it to work.

code to save fields
<input type="text" name="username" onChange="save_field(this)">

To save a field on form submit you can simply add


to the onSubmit handler of the form.


The login form

<form action="http://www.domain.com/cgi-bin/carpemail/umm.cgi" method="POST" name="login">
<input type=hidden name=action value=login>

code here

<input type="image" border="0" src="http://www.domain.com/webemail/lang/eng/umm/umlogin.gif" onMouseOver="this.src='http://www.domain.com/webemail/lang/eng/umm/umlogin2.gif'" onMouseOut="this.src='http://www.domain.com/webemail/lang/eng/umm/umlogin.gif'" alt="Login">