|
-
Jun 16th, 2001, 08:05 AM
#1
Thread Starter
Member
Button Tag Doesn't Work as Advertised
I'm reading a book on Dynamic HTML and I'm a bit frustrated with the Button Tag. I've created four buttons along the bottom of my form to be used as navigation and they don't wanna play nice.
Using the input tag I can do this:
<input type=submit name=navbutton value=first>
<input type=submit name=navbutton value=previous>
<input type=submit name=navbutton value=next>
<input type=submit name=navbutton value=last>
Which creates an "array" of buttons. I check for the navbutton value on the server side and it tells me what button was pushed.
When I try the same thing with the button tag I cannot create the "array" this way and the value isn't submitted as my text says it will be:
<button type=submit name=navbutton value=next>NEXT</button>
Instead of getting the value of the button I get the text inserted between the tags. This is NOT the name/value pair that should be submitted. For instance, in the above example I get "NEXT" as the value instead of "next".
-
Jun 18th, 2001, 06:32 AM
#2
Try using the button.innerText property instead.
The value would give you the value, wouldn't it?
What did you expect?
-abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jun 19th, 2001, 02:41 AM
#3
Frenzied Member
That is the correct behavior of the Button tag. (didn't you wonder why there were two tags that did essentially the same job)
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|