Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing all form fields in OnLoad

Status
Not open for further replies.

jasonsalas

IS-IT--Management
Jun 20, 2001
480
GU
I'm trying to develop a JavaScript routine that will emulate the user manually clicking an <input type=&quot;Reset&quot;> button.

I'm going to have the routine fire in the OnLoad event of the page, but is there a function within JavaScript that does this programmatically, and how can one access it?

Something like:
<script language=&quot;JavaScript&quot;>
function clearFields()
{
document.all.Reset();
}
</script>

Thanks for your help!
 
<body onLoad=&quot;document.myForm.reset()&quot;>

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top