Hi everyone, I am trying to pass a valu when a user clicks the button on my form. Is there any option on a button that I can set so i can retrieve a value besides "value".
can we see code? what language are you using? aps, php, cf...? is there a link?
essentially you give all your text fields an id so when you hit submit and you pass your form onto the processing page (php example) then each field name is the variable that you are passing..So if you have a field called username and that fields id is "user" and i enter a name called "pinky" then the variable in the processing script would be $user and its value would be "pinky"
[Hammer]
Nike Failed Slogans -- "Just Don't Do It!"
Sorry to contradict but that isn't correct. Using your example the name pinky would create a variable called pinky.
Have your thought of creating the variable you want to pass using hidden?
<input type="hidden" name="<variable name>" value="<variable value>">
If your using text fields, i.e. type="text", then the same process as above would apply expect replacing the type.
I ahve never heard of the name being used as a variable value. I have checked to see what the content of a button is to determine what action to take but never to see what a button's name is. Why would I want to know it's name? I already would know this I would just want it's value, or some other element from the form.
Humble Seeker
-----------------------------------------------------
The longest journey begins with the smallest step.
Hrm, if you're doing a form submit you can pass the value by using a field name then recalling it on the processing page with Request.Form. For example on the form page you'd have:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.