Click here to get back home

Persuading IE to do the right think with

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Persuading IE to do the right think with Steve Swift 12-09-2007
Get Chitika Premium
Posted by Jonathan N. Little on December 10, 2007, 9:32 am
Please log in for more thread options
Steve Swift wrote:
>> In addition:
>
> Several hours later I got to pondering: I wonder if any one at all finds
> the inner html useful when returned where the VALUE= should be expected?
>
> Even amongst web developers at Microsoft.
>

I cannot see any use, considering having to use VALUE attribute in order
to change the caption of <INPUT TYPE='submit'> is normally undesirable.

Ask them. I can only imagine the response.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Posted by Bergamot on December 10, 2007, 12:31 pm
Please log in for more thread options
Steve Swift wrote:
>>
>> http://msdn2.microsoft.com/en-us/library/ms535211.aspx
>
> Several hours later I got to pondering: I wonder if any one at all finds
> the inner html useful when returned where the VALUE= should be expected?

innerHTML is a Microsoft invention thus a non-standard attribute, so I'd
say not. Other browsers do support it (out of necessity, I imagine), but
avoid it if there is a standards way to get the info.

--
Berg

Posted by Steve Swift on December 11, 2007, 2:07 am
Please log in for more thread options
Bergamot wrote:
> innerHTML is a Microsoft invention thus a non-standard attribute, so I'd
> say not.

InnerHTML is a concept that I've managed without so far. In the context
of <BUTTON>, I just assumed that it was the "stuff" between the <BUTTON>
and the </BUTTON>, since that is what I get in my CGI scripts.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Posted by Jonathan N. Little on December 9, 2007, 9:44 am
Please log in for more thread options
Steve Swift wrote:
> Faced with:
> <BUTTON NAME=ORDER VALUE=1 TYPE=SUBMIT>Order</BUTTON>
> Internet explorer sends "ORDER=Order" rather than "ORDER=1".
>
> Is there any way to persuade it to do what was intended, to submit the
> actual VALUE of the button rather than its caption?
>
> Is there any HTML proposal to add add an extra parameter to the <SUBMIT>
> control (something like USEVALUE) so that IE would have to implement it
> properly, and we could write sensible CGI scripts?
>

<input name="order" type="submit" value="Order">

Perl:

$order=param('order') eq 'Order' ? 1 : 0;

What makes you hope that MS will "come on board" any time soon?

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Posted by Jukka K. Korpela on December 9, 2007, 2:55 pm
Please log in for more thread options
Scripsit Steve Swift:

> Faced with:
> <BUTTON NAME=ORDER VALUE=1 TYPE=SUBMIT>Order</BUTTON>
> Internet explorer sends "ORDER=Order" rather than "ORDER=1".

And it gets even weirder if the <button> element's content has some
markup. Who would have guessed that the content with all the markup gets
sent?

> Is there any way to persuade it to do what was intended, to submit the
> actual VALUE of the button rather than its caption?

Not really. Of course you could upgrade the construct to a nice normal
submit button
<input type="submit" name="ORDER" value="1">
but even this isn't really safe, really. Sorry. Please don't shoot the
messenger.

> Is there any HTML proposal to add add an extra parameter to the
> <SUBMIT> control (something like USEVALUE) so that IE would have to
> implement it properly, and we could write sensible CGI scripts?

They decided to break the rules seriously when implementing <button> in
IE, so why would they care about new rules any more?

The reason why even
<input type="submit" name="ORDER" value="1">
isn't really safe is that in most cases, you have at least one text
input field in the form. Now, what happens when the user hits Enter in
that field? The specifications are unclear. Common browser behavior
seems to be that the form data is submitted as if the _first_ submit
button were used, but would you really rely on this?

The safe approach is to have a single submit button (or several submit
buttons with the same function, for convenience, in some cases). This
means that you would use radio buttons or checkboxes to select the
action to be carried out. Granted, this means that often the user needs
to click twice (radio button and submit button) instead of clicking
once, but on balance, the single click takes more time since the user
has to select between alternatives.

(If you use radio buttons that way, make sure one of them is
preselected, with checked="checked", normally a neutral one indicating
no action. This is an additional measure against unintended actions.)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap