Link to home
Start Free TrialLog in
Avatar of jamie_lynn
jamie_lynn

asked on

How do I get the mouse position from an iframe?

Hi,
How do I get the mouse position from an iframe.
i.e.
In the example html, if you click anywhere other than the calendar, it will alert the mouse position.  How can I get the mouse position inside the calendar?

Thanks
Jamie
<html>
<head>
<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
   $(document).click(function(e){
      alert(e.pageX +', '+ e.pageY);
   }); 
})
</script>
<body>
 
 
<div id="google_calendar">
	<iframe src="http://www.google.com/calendar/embed?src=usa%40holiday.calendar.google.com&ctz=America/Los_Angeles" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
</div>
</body>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of prokvk
prokvk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial