Windows Vista Tips

Windows Vista Tips > Newsgroups > Internet Explorer > IE Zoom Click Coordinates

Reply
Thread Tools Display Modes

IE Zoom Click Coordinates

 
 
Aric TenEyck
Guest
Posts: n/a

 
      12-11-2009
I have a clickable image on my web site that passes the clicked coordinates
back to the server, where they are processed.

When the user is zoomed at 100%, the coordinates correspond to the image
correctly.

When the user is zoomed at any other zoom level, I get the actual pixel
coordinates that they clicked on, rather than a normalized pair.

To reproduce:

1) Create a 100x100 image in paint. Maybe a crosshair so you can reliably
click in the middle. Save it as 100x100.gif
2) Add the following to an ASPX page:

<asp:ImageButton runat="server" ImageUrl="100x100.gif" ID="Map"
onclick="Map_Click" ></asp:ImageButton>
<br /><br />
<asp:Label ID="lblOutput" runat="server"></asp:Label>


3) Add the following to the codebehind:

protected void Map_Click(object sender, ImageClickEventArgs e)
{
lblOutput.Text = "Clicked at " + e.X + ", " + e.Y;
}


4) Load the page in a web browser. Click the center of the image, and the
label will say "Clicked at 50, 50" (or close to that, anyway)

5) Zoom the image out to 200%. Click the center of the image and the label
will say something like "Clicked at 100, 100"

Expected Behavior : Clicking the center of the image should return X=50 and
y=50 to the server, regardless of the client's chosen zoom level.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/communities...plorer.general
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Security essential Essentials is not getting installed sun Server Setup 0 12-01-2009 01:19 PM
How to access an AOL Email account with WINDOWS MAIl Emmanuel Windows Vista Mail 10 11-23-2009 02:15 AM
How to single click Sandee Windows Vista Administration 5 09-28-2007 03:17 AM
nasty oops Jason Windows Vista Administration 11 09-10-2007 02:16 AM
Lost CD Drives Dub Windows Vista Hardware 6 06-24-2006 06:08 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59