Forum Moderators: open

Message Too Old, No Replies

Cra**y Internet Explorer 6

Truely the new NN4

         

aspr1n

7:35 pm on May 13, 2003 (gmt 0)

10+ Year Member



Anyone know how to get this piece of garbage to do the following:

<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

ShawnR

4:30 am on May 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, this is a bug with IE. Two possible work arounds:
  • Javascript
  • <input type="submit" name="action" value="Add">
    <input type="submit" name="action" value="Del">

    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

aspr1n

11:54 am on May 14, 2003 (gmt 0)

10+ Year Member



Thanks for that Shawn, I'd just hoped someone would say "asp all you need to do is..." :( ah well!

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

ShawnR

1:26 pm on May 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>>"...element it's legal to have the same name..."
OK, thanks for clearing that up