|
-
Oct 15th, 2002, 05:15 AM
#1
Thread Starter
Hyperactive Member
Pointing to a place and recalling the location.. Layers ?
Right, imagine a map that will one day be on my website!!! What i want to be able to do is put another picture on top of that at a certain point relating to the place clicked on the map. I.E. I click somewhere and the pin goes there. I also want to be able to save this pisition to a text file (which i can do) but then recall it when the page reloads and put it back on the map for all people to see (which i cant do).
I know this is possible in javascript but as i cant do javascript and like PHP more, does anyone know how to do this ??
Thanks!
Power to 2000 Electronic Donkeys!
www.edonkey2000.com
I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".
-
Oct 15th, 2002, 01:03 PM
#2
Frenzied Member
if you don't want the page to reload eveytime then you have to do it with javascript. with php it will need to be reloaded.
javascript will have to be run as you would need the postion of the mouse cursor and then save those positions to a file with php.
other than that I don't think you can do it any other way.
-
Oct 17th, 2002, 03:24 AM
#3
Thread Starter
Hyperactive Member
so it wouldnt be possible iwth opurely PHP ? cannot PHP track a location of a cursor on an image ??
hmmm, ill hav ea look at some javascripting tutorials then thanks for your help
Power to 2000 Electronic Donkeys!
www.edonkey2000.com
I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".
-
Oct 17th, 2002, 09:10 AM
#4
Frenzied Member
php is all server side and can't see the client side of things, so the only way to do it is to use javascript as that is client side.
-
Oct 17th, 2002, 02:38 PM
#5
Thread Starter
Hyperactive Member
so what i could do is use javascript to log the position of the cursor and then write it to an integer for example. I could then use PHP to write that co-ordinate to a file!!
Then as the page re-loads, it reads the file with the co-ordinates in, then plots the little picture of a pin to that co-ordinate on the map...
will this work ?
thanks
Power to 2000 Electronic Donkeys!
www.edonkey2000.com
I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".
-
Oct 17th, 2002, 02:49 PM
#6
Thread Starter
Hyperactive Member
Originally posted by phpman
php is all server side and can't see the client side of things, so the only way to do it is to use javascript as that is client side.
oh, and that is possibly one of the most useful things i have ever been told about PHP, really!
Power to 2000 Electronic Donkeys!
www.edonkey2000.com
I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".
-
Oct 17th, 2002, 03:20 PM
#7
Frenzied Member
Originally posted by JafferAB
so what i could do is use javascript to log the position of the cursor and then write it to an integer for example. I could then use PHP to write that co-ordinate to a file!!
Then as the page re-loads, it reads the file with the co-ordinates in, then plots the little picture of a pin to that co-ordinate on the map...
will this work ?
thanks
that just might work. php can read some variables from javascript so it might work like you say.
now are really serious as to what you said in your last post or jsut being a smarty
-
Oct 22nd, 2002, 03:50 PM
#8
Frenzied Member
With your javascript, you can send the Browser to a an extra page
"map.php" using javascript to pass "x=?&y=?&page=????" to it, and then write the file with that, and then
header("Location: $page");
and when it reloads, it can read the x=??&y=?? and make a javascript x=<?php echo $x;?> y=<?php echo $y;?>
JavaScript put the persons mouse there?
I dont know how to do this, but it should be possible?
(MySQL may be easier for it, not too sure .. Cuz it mite need to deal with IP's unless u set a cookie?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|