Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 21st, 2009, 01:24 AM
Authorized User
 
Join Date: Dec 2008
Posts: 18
Thanks: 1
Thanked 0 Times in 0 Posts
Default Mouse Coordiantes inside an Image

how to get the XY coordinates inside an image.I've an image in my application and i would like to get the position of the mouse inside the image and not the entire screen.And how to get the absolute position even when the screen is minimized .....like in paint
__________________
Yamini
 
Old July 23rd, 2009, 06:45 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

You have to get the coordinates of the mouse within the *window* and then subtract the origin coordinates of the image.

But I don't understand how you can get the coordinates if the window is minimized, because then the window never even *sees* the mouse.

As to how to get the coordinates within the window: Depends on the browser. There are various libraries out there that will help you with this.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Greeting Cards Image Upload Inside Update Panel asp2go BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 October 4th, 2012 04:06 PM
Accessing and using an ActiveX from inside a HTML page hosted inside a WebBrowser con adyrotaru C# 2005 2 June 25th, 2009 04:21 PM
Image stretch or reduced to fit inside button remya1000 General .NET 5 October 23rd, 2008 03:15 PM
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:37 AM
Dynamically Setting X, Y Coordiantes of Element [email protected] Javascript 4 August 21st, 2005 05:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.