Click to See Complete Forum and Search --> : set all fields to empty


DCPAus
12-06-2002, 09:05 PM
I have a variety of input fields and forms on my page, when a user goes back to the page I would like all the fields to reset to empty

Is there a simple onload I can use something like

document.form.inout.value="" that will reset all fields in all forms ?

Thanks :confused:

Zach Elfers
12-06-2002, 09:22 PM
<script language="JavaScript" type="text/JavaScript">

function Reset(form) }
form.inputName.value = "";
// repeat this for each form element.
}

</script>

<body onLoad="Reset(this.form);">

That will do it.