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

How to change a form value with a button

Status
Not open for further replies.

sthmpsn1

MIS
Joined
Sep 26, 2001
Messages
456
Location
US
How do I change a form elements value with a button. This is what I have so far and it doesn't work

<input type=&quot;button&quot; name=&quot;showbutton&quot; value=&quot;Show Me The Totals&quot; onClick=&quot;showAnswers()&quot;;this.form.showall.value==&quot;2&quot;&quot;>
 
change this.form.showall.value==&quot;2&quot;&quot;
to this.form.showall.value='2'&quot;
 
humm i mean change
onClick=&quot;showAnswers()&quot;;this.form.showall.value==&quot;2&quot;&quot;
to
onClick=&quot;showAnswers();this.form.showall.value='2'&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top