I have a textarea in which a user can input some information, and I have a submit button. The form is submitted into another frame, therefore, the textarea isn't cleared automatically and I need to do that using javascript. I use the onClick property of the submit button to call the following code:
Code: Select all
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}Code: Select all
<input type="image" name="submit" value="newshout" onclick="clearText(shout)" src="images/button_overlay.gif" alt="" width="56" height="14" border="0">Thanks.