Forum Moderators: open
<form name="form" method="post" action="form.php">
<button type="submit" name="PostVal" value="func1,arg1,arg2,arg3">Add</button>
<button type="submit" name="PostVal" value="func2,arg1,arg2,arg3">Del</button>
</form>
All I am trying to do is create a POST variable called "PostVal" and set the value to 'value'. Every proper web browser handles this fine except IE6.
The 'type' attribute default is 'submit' according to the W3C spec therefore need not be specified, but without it IE just shows a useless button, with it whatever button you press it decides the 'PostVal' value is 'Del' - and that would be set as a 'value' where Mr Gates?
I would ask him to spell the word 'competence' but frankly doubt if any member of his entire IE development team can even do joined up handwriting, so I won't hold my breath.
asp
Then you will get?action=Add or?action=Del, depending on what you press.
(Note: Not sure how legit it is to use the same name for different buttons, but even once you fix that, it won't do what it is meant to, you'll get postval1=Add&posval2=Del, irrespective of which button you press).
Shawn
This if for a UI toolbar I'm writing, so I've decided to do two versions one for standards compliant browsers and one for IE with javascript.
FYI, certainly on the <button> element it's legal to have the same name, as one of the remits for button is to allow different buttons to submit different values in the same GET/POST form.
Thanks for putting up with the rant ;)
asp