onlyican Posted August 25, 2006 Share Posted August 25, 2006 hahahaha, this is gonna be fun I thinkGoing tohttp://onlyican.com/images.phpYou will see an imageand if you play with the form at the bottom, u see that depending what you select, it makes a box turn blackThis is using GD LIBThe orig image (green with the yellow stripes) is one imageTHe black box is another imageWhat I am looking for, is if someone clicks on that image, for me to find out the image pixle location of where they clickedI dont want the geographical location of the click (where 0,0 is the top left of the screen)I need it to be the image location(where 0,0 is the top left corner of the image)I think this is client side scripts (Javascript), as I dont think it can be done in server side scripting(php)By the way, You may have guessed. I am using php Quote Link to comment https://forums.phpfreaks.com/topic/18645-pixle-location-of-image-when-clicked/ Share on other sites More sharing options...
AndyB Posted August 25, 2006 Share Posted August 25, 2006 If you use the image itself as a submit 'button', then php will pass the x and y co-ordinates (relative to the upper left corner of the image) of where it was clicked as the 'name' values of the submit button, i.e. $_POST['submit_x'] and $_POST['submit_y'] Quote Link to comment https://forums.phpfreaks.com/topic/18645-pixle-location-of-image-when-clicked/#findComment-80345 Share on other sites More sharing options...
onlyican Posted August 25, 2006 Author Share Posted August 25, 2006 Now I never knew thatThanks Quote Link to comment https://forums.phpfreaks.com/topic/18645-pixle-location-of-image-when-clicked/#findComment-80350 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.