Closed Thread Icon

Topic awaiting preservation: Mouse coordinates (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8205" title="Pages that link to Topic awaiting preservation: Mouse coordinates (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Mouse coordinates <span class="small">(Page 1 of 1)</span>\

 
Rane
Bipolar (III) Inmate

From: Denmark
Insane since: Oct 2001

posted posted 06-07-2002 09:53

Hey there,

inspired by Max's worldmap webpage, Im trying to make something a tiny bit similar but much simpler as my latitude/longtitude programming skills aint very good and so on.

I was thinking...if i have a website with a huge world map (speaking of which...anyone know where i can find a good one thats free to use?) - i was thinking about making the cursor to a crosshair and using the mouse-coordinates to determine where the users are.

Now comes the big question - if she user clicks on the map where they live, how do i get the X and Y coordinates and how do i save them so I can find them and mark their spot manually on the map?

(btw. if anyone has better ideas how to create this feature, or something like it...please let me know - its for a irc chat webpage so everyone can see where ppl are from and so on)

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 06-07-2002 10:17

you can do this:

<form action='your-saving-script.php'>
<input type='image' src='images/map.jpgg' width=100 height=100>
</form>

when the user clicks on the map, you will receive two variables named 'x' and 'y' something like:
http://dasdasdsa/your-saving-script.php?x=42&y=23

good luck,

Rane
Bipolar (III) Inmate

From: Denmark
Insane since: Oct 2001

posted posted 06-07-2002 10:33

Wow, was it really that easy. It can even be stored in a database and used from there. Amazing - thanks lallous

« BackwardsOnwards »

Show Forum Drop Down Menu