Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-05-2003, 04:40 AM   PM User | #1
ekaja
New to the CF scene

 
Join Date: Feb 2003
Location: Thailand
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
ekaja is an unknown quantity at this point
Unhappy i wanna code for show x:y on image ??

umm..


i want code


onmouseover on image
show X Y


thx
ekaja is offline   Reply With Quote
Old 02-05-2003, 04:59 AM   PM User | #2
joh6nn
wei wu wei


 
joh6nn's Avatar
 
Join Date: Jun 2002
Location: 72° W. 48' 57" , 41° N. 32' 04"
Posts: 1,887
Thanks: 0
Thanked 1 Time in 1 Post
joh6nn is an unknown quantity at this point
what?
__________________
bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

i am a loser geek, crazy with an evil streak,
yes i do believe there is a violent thing inside of me.
joh6nn is offline   Reply With Quote
Old 02-05-2003, 05:49 AM   PM User | #3
ekaja
New to the CF scene

 
Join Date: Feb 2003
Location: Thailand
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
ekaja is an unknown quantity at this point
Lightbulb i no good at English

i have image

i want show x:y[width:height] mouse part on image
ekaja is offline   Reply With Quote
Old 02-05-2003, 06:49 AM   PM User | #4
Dylan Leblanc
Regular Coder

 
Join Date: Sep 2002
Location: British Columbia
Posts: 235
Thanks: 0
Thanked 0 Times in 0 Posts
Dylan Leblanc is an unknown quantity at this point
So when the mouse pointer is put over top of the image, the X and Y coordinates relative to the image will be displayed?
Dylan Leblanc is offline   Reply With Quote
Old 02-05-2003, 08:50 AM   PM User | #5
Roelf
Senior Coder

 
Join Date: Jun 2002
Location: Zwolle, The Netherlands
Posts: 1,110
Thanks: 2
Thanked 28 Times in 28 Posts
Roelf is on a distinguished road
this works in IE 5.5:

Code:
<html>
<head>
<title>Coordinates</title>
<script type="text/javascript">
function showcoords() {
  var x=0,y=0;
  x = event.offsetX;
  y = event.offsetY;
  window.status = "x = " + x + ", y = " + y;
  return (true)
}
</script>
</head>

<body>

<img src="yourpic.jpg" onmousemove="showcoords()" />
</body>
</html>
__________________
I am the luckiest man in the world
Roelf is offline   Reply With Quote
Old 02-05-2003, 05:14 PM   PM User | #6
ekaja
New to the CF scene

 
Join Date: Feb 2003
Location: Thailand
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
ekaja is an unknown quantity at this point
Thx for ALL

Thank You
ekaja is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 11:11 AM.


Advertisement
Log in to turn off these ads.