• Advertisement
Sign in to follow this  

[web] [noob] http POST and forms.

This topic is 3740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Question, suppose I have a form with a textbox, a hidden value, and two buttons. Suppose if the second button was pressed, I want the hidden value to be something else. Assume I'm using http POST, if that matters. Is there an easier way to do this than defining a javascript function for the button's onclick to change the value of the hidden value?

Share this post


Link to post
Share on other sites
Advertisement
You can assign a value to a button so that you know what button was pressed by the user. Otherwise, changing a hidden value will require a javascript. It's pretty simple to do though. You can have a function called from the onClick value of the button that sets formname.hiddenfieldname.value.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement