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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear a Form Input Text Field

Status
Not open for further replies.

Michael42

Programmer
Joined
Oct 8, 2001
Messages
1,454
Location
US
Hello,

I think I have been looking at the screen too long please help. (-:

I want to clear a form field (<input type=text name=keyword>) but I am having no success.

I am trying variations of the below:
document.forms[0].keyword.value=&quot;&quot;;

What am I possibly doing wrong?

Thanks,

Michael42
 
What is the actual line of code defining your form? What is the actual line of code defining the control?

Cheers,


[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Uggg!

EdwardMartinIII,
I had the below type set to 'reset'. Your question helped me find it. Thanks!!!

<input type='button' value='Reset' onclick='resetSearch();'>

 
Ah, all those years of playing with the Eliza program are finally paying off. [lol]

Glad that worked!

Cheers,


[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top