Sign in to follow this  
matt_j

[web] [noob] http POST and forms.

Recommended Posts

matt_j    106
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
coderx75    435
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this