HaLo2FrEeEk Posted August 29, 2007 Share Posted August 29, 2007 I'm pretty sure this is Javascript (or AJAX) and not pure php, but it's worth a try. I am going to attempt something where a person uploads an image, which is then displayed in a frame, the top-left corner of which would be coordinate (0,0), they will be able to click anywhere on the imge and the coordinates of where they clicked would be saved. I'm going to make a dynamic countdown script (not flash, but picture based) that will display their own picture, with a countdown inside it. I know the script to do the countdown, but I want to know how to find the coordinates so they can decide where the minutes, seconds, hours, etc. are going to be placed in the image. I kinda want to get started on this tonight, so any speedy help would be appreciated very much. Quote Link to comment https://forums.phpfreaks.com/topic/67166-solved-coordinate-finder/ Share on other sites More sharing options...
HaLo2FrEeEk Posted August 29, 2007 Author Share Posted August 29, 2007 Bump. Quote Link to comment https://forums.phpfreaks.com/topic/67166-solved-coordinate-finder/#findComment-336906 Share on other sites More sharing options...
pocobueno1388 Posted August 29, 2007 Share Posted August 29, 2007 I don't think PHP can do this...here are some pages that might be of some help: http://www.devx.com/tips/Tip/29285 http://www.quirksmode.org/js/events_properties.html Here, there is a bunch on google: http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=finding+coordinates+of+mouse+with+javascript&spell=1 Quote Link to comment https://forums.phpfreaks.com/topic/67166-solved-coordinate-finder/#findComment-336918 Share on other sites More sharing options...
HaLo2FrEeEk Posted August 29, 2007 Author Share Posted August 29, 2007 I know how to get the mouses coordinates on a whole page, I need to know how to get them inside a predefined area (the height and width of the uploaded picture) Quote Link to comment https://forums.phpfreaks.com/topic/67166-solved-coordinate-finder/#findComment-336932 Share on other sites More sharing options...
HaLo2FrEeEk Posted August 29, 2007 Author Share Posted August 29, 2007 Bump! Quote Link to comment https://forums.phpfreaks.com/topic/67166-solved-coordinate-finder/#findComment-336971 Share on other sites More sharing options...
matthewhaworth Posted August 29, 2007 Share Posted August 29, 2007 Put the picture inside a <div> and make it relative? How do you get the co-ordinates when it's not inside a picture? Quote Link to comment https://forums.phpfreaks.com/topic/67166-solved-coordinate-finder/#findComment-336988 Share on other sites More sharing options...
HaLo2FrEeEk Posted August 29, 2007 Author Share Posted August 29, 2007 I found something, found a workable script that I was able to modify to my needs, hopefully it will work. Thank you all. Quote Link to comment https://forums.phpfreaks.com/topic/67166-solved-coordinate-finder/#findComment-337025 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.