[Sussex] Make IE 7 crash
Steve Dobson
steve at dobson.org
Thu Jan 31 15:48:16 UTC 2008
Vicky
On Thu, 2008-01-31 at 15:31 +0000, Vicky Lamburn wrote:
> Take today's discovery for example: I am now using the <button> tag
> instead of <input type="submit" etc. This gives me the potential in a
> compliant browser (anything Gecko, Webkit/KHTML and Opera based
> generally) the opportunity to have a submit button a la:
<snip>
> Guess what. IE including the latest version 7 with its patches doesn't
> do this. (Go on, say you're surprised) Instead it sends the innerHTML
> of the button tags, meaning that IE will send "Accept Changes" instead
> of acceptChanges and "Reject Changes" instead of "rejectChanges"
>
> Ridiculously infuriating.
>
> Solution is to use Javascript which is less than optimal with the following:
>
> <button type="submit" id="acceptChanges" value="1"
> onclick="this.setAttribute('value',this.value);"
> >Accept Changes</button>
> <button type="submit" id="rejectChanges" value="0"
> onclick="this.setAttribute('value',this.value);"
> >Reject Changes</button>
>
> Oh the fun I have every week waging battle with the delights of IE and
> 80% of the population that use it.
I've always used:
<input type="submit" name="accept" id="accept" value="Accept">
<input type="submit" name="reject" id="reject" value="Reject">
as that way I can test for the existence of a named attribute in the
returned data stream (I mainly use J2EE these days) to determine which
button was pressed. Doesn't this work with IE?
Steve
More information about the Sussex
mailing list