[Javascript] Form Reset Button
Alan Easton
alan.easton at unn.ac.uk
Thu Mar 29 09:12:25 CST 2001
Hi Guys,
I've managed to get round it, not perfect but it works. Here it is for
anyone interested.
<a href="#none" OnClick="clear2()"><img src="images/clear.gif" border="0"
name="reset" width="49" height="20" alt="Clear Enquiry Form"></a>
And the function clear2() does this:
<script language="Javascript">
function clear2() {
document.equery.txtname.value = "";
document.equery.txtemail.value = "";
document.equery.txtformarea.value = "";
document.equery.txtname.focus();
return true;
}
Thanks for the help anyway guys,
Alan...
-----Original Message-----
From: TomMallard [mailto:mallard at serv.net]
Sent: Thursday, March 29, 2001 3:51 PM
To: javascript
Subject: Re: [Javascript] Form Reset Button
Have you tried this idea?
<a href="javascript:document.formName.reset();"><img
src="imageName.xxx"></a>
tom mallard
seattle
----- Original Message -----
From: "Alan Easton" <alan.easton at unn.ac.uk>
To: "'Java-List'" <javascript at LaTech.edu>
Sent: Thursday, March 29, 2001 6:29 AM
Subject: [Javascript] Form Reset Button
> Hello People,
>
> Is it possible to replace the Reset button of a form with an image file,
but
> still make it clickable so it will clear the form. I've tried running an
> OnClick function, but can't get it to work.
>
> Thanks for any guidance,
>
> Alan Easton
> mailto:alan.easton at unn.ac.uk
>
>
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list