Jump to content
  • Advertisement
Sign in to follow this  
matt_j

[web] [noob] http POST and forms.

This topic is 3887 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!