Re: Problem with firefox

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: bruce barker (nospam_brubar_at_safeco.com)
Date: 02/14/05


Date: Mon, 14 Feb 2005 14:39:16 -0800

its an asp.net bug

first the imagebutton does not use javascript. but asp.net does have a bug
in handling the postback of an image button when the enter key is pressed
instead of being clicked on.

the w3c spec says when an image button is clicked, in addtion to the value
being submitted, the x and y coordinates inside the image are passed (so the
button can be used as an imagemap).

take the following html

<input type=image src=myimg.gif value=1 name=mysubmit>

if you clicked on the upper right corner, then the browser sends:

    mysubmit=1&mysubmit_x=1&mysubmit_y=1

now if you hit enter most browsers (but not IE) send

    mysubmit=1

so if you are concerned where the user clicked, you know they didn't, but IE
sends

    mysubmit=1&mysubmit_x=0&mysubmit_y=0

asp.net has a bug where it renders the image button as:

    <input type=image src=myimg.gif name=mysubmit>

(no value attribute is rendered) so the click from above sends

    mysubmit_x=1&mysubmit_y=1

and an enter press sends:

    mysubmit_x=0&mysubmit_y=0 in IE

while in other browsers, no values for the image are posted at all.

asp.net is looking for the x or y value, doesn't see it and therefore can
not do the onclick dispatch. as an aside, the same behavior occurs if images
are not rendered (turned off by the user).

-- bruce (sqlwork.com)

<jeff29_b@yahoo.com> wrote in message
news:1108411594.088421.83650@f14g2000cwb.googlegroups.com...
| I tried to post this message before but didn't see it. In firefox, an
| OnClick event handler for the codebehind class is not being call on an
| asp:ImageButton. It works fine in i.e.? Any ideas?
|



Relevant Pages

  • Re: opera 11 and changing input value
    ... a new bug in a minor version update, ... How do you know it "works" in browsers other than those you "currently ... If you want to "trick" the browser into refreshing the rendering. ... but my Opera 11.01 is stuck on 0% trying to download the ...
    (comp.lang.javascript)
  • Re: Firefox and JEditorPane and JLabel
    ... I discovered this bug appears with all browsers, ... setText gets called more than once. ... For some reason Firefox calls init twice, that is why the bug showed ... I was able to discover all kinds of people who are also getting in ...
    (comp.lang.java.gui)
  • Re: CSS font sizes - whats best to use?
    ... Oh god, I need to lie down. ... analysis of its effects on different browsers, ... avoids a bug in IE. ...
    (alt.html)
  • Re: newbie: header spanning two columns with left- and right-alignment
    ... It is really better to upload a page and give a URL, so participants in this group don't get to waste time on things that do not exist in real life. ... differently to other browsers! ... my page - the 'right aligned text' is outside the red border, ... And I don't know my way around bugs and bug reports either. ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: somewhat OT...
    ... Looks more like a bug or deliberate deficiency to me. ... Twiddle your thumbs while E-mail renders. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)