I am using an image input object to return the coordinates of a mouse
click in a form submit. This is working fine with one exception. In
IE the (x,y) are relative to the image, but in Firefox they are
relative to the frame. For example, a click on the image in IE
returns (5,5) but in Firefox the same location click returns (75,39).
Here is the html from the page:
I say the Firefox coordinates returned are relative to the frame
because the style command that positions the image is the same offset
coming back in my (x,y) pair.
Is this normal behavior for Firefox, and if so, what is the best way
to code around it so the correct image relative coordinates are
returned?
Re: input type=text and firefox versus ie
am 05.07.2007 08:53:35 von marss
johnebull...@hotmail.com wrote:
> I am using an image input object to return the coordinates of a mouse
> click in a form submit. This is working fine with one exception. In
> IE the (x,y) are relative to the image, but in Firefox they are
> relative to the frame. For example, a click on the image in IE
> returns (5,5) but in Firefox the same location click returns (75,39).
> Here is the html from the page:
>
>
> ID='lbl_image' NOSAVE ALIGN='top' BORDER='0' WIDTH='300' HEIGHT='100'
> SRC='../../../cgi-bin/gtrtlm/c_lbl_image.cgi>
>
Try this approach:
Regards, Mykola
http://marss.co.ua
Re: input type=text and firefox versus ie
am 05.07.2007 23:41:52 von jkorpela
Scripsit johnebullock@hotmail.com:
> I am using an image input object to return the coordinates of a mouse
> click in a form submit. This is working fine with one exception.
You mean people who cannot click on a particular location because they are
using a speech browser or they suffer from motoric disability or they lack a
mouse right now or they just don't understand the concept?
> In IE the (x,y) are relative to the image, but in Firefox they are
> relative to the frame.
Frame? What frame? Why don't you post a URL?
> Here is the html from the page:
>
>
> ID='lbl_image' NOSAVE ALIGN='top' BORDER='0' WIDTH='300' HEIGHT='100'
> SRC='../../../cgi-bin/gtrtlm/c_lbl_image.cgi>
It's invalid markup, and it contains incorrect CSS code (the declarations
for left and top are ignored by conforming browsers), so what can you
expect?
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: input type=text and firefox versus ie
am 07.07.2007 18:41:33 von johnebullock
On Jul 5, 5:41 pm, "Jukka K. Korpela" wrote:
> Scripsit johnebull...@hotmail.com:
>
> > I am using an imageinputobject to return the coordinates of a mouse
> > click in a form submit. This is working fine with one exception.
>
> You mean people who cannot click on a particular location because they are
> using a speech browser or they suffer from motoric disability or they lack a
> mouse right now or they just don't understand the concept?
>
> > InIEthe (x,y) are relative to the image, but inFirefoxthey are
> > relative to the frame.
>
> Frame? What frame? Why don't you post a URL?
>
> > Here is the html from the page:
>
> >
> > ID='lbl_image' NOSAVE ALIGN='top' BORDER='0' WIDTH='300' HEIGHT='100'
> > SRC='../../../cgi-bin/gtrtlm/c_lbl_image.cgi>
>
> It's invalid markup, and it contains incorrect CSS code (the declarations
> for left and top are ignored by conforming browsers), so what can you
> expect?
>
> --
> Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
It's running on a private corporate firewalled site, so I can't post
the URL or I would have.
I figured out another way to do it, I was really just curious why the
difference in coordinates returned. I have since found a lot of other
inconsistencies as well, and
will know to code around them in the future.
By the way, the positioning does work in Firefox and IE, even if it's
invalid markup. Those are the only two browsers the customer will be
using. How is the markup invalid anyways?