brenda Posted May 7, 2011 Share Posted May 7, 2011 I am not sure whether this is an appropriate question for this forum but am hoping it might be. I have an image and intend to create a number of image maps of it so that readers can click on various parts of the image and then get a document coming up inviting them to write their thoughts about that part of the image. I am wondering whether it is possible, once they have written down their thoughts, for what they have written then to be superimposed on the image where the image map is? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/ Share on other sites More sharing options...
spiderwell Posted May 7, 2011 Share Posted May 7, 2011 theres no reason why not, I am pretty sure each area defined on an imagemap can be given an alt/title attribute. however it will probably involved some javascripting to be acheived Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211865 Share on other sites More sharing options...
brenda Posted May 7, 2011 Author Share Posted May 7, 2011 Thank you for your reply Spiderwell. Sorry if I am being thick here but I don't understand how the alt or title attributes would enable me, even using javascript, to overwrite the original image map. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211872 Share on other sites More sharing options...
spiderwell Posted May 7, 2011 Share Posted May 7, 2011 you are not being thick, I don't know how to do it either, otherwise I would have given you a code snippet its not the simplest of things to do. Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211877 Share on other sites More sharing options...
ZulfadlyAshBurn Posted May 7, 2011 Share Posted May 7, 2011 I don't get what you need. if you need to do image map, get your image coordination first. Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211889 Share on other sites More sharing options...
brenda Posted May 7, 2011 Author Share Posted May 7, 2011 Its not creating the image map that is the problem. What I would like to do, if possible, is to allow the person clicking on the image map to open a document that they can write to which will then replace the image map. Is that possible and if so how? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211891 Share on other sites More sharing options...
ZulfadlyAshBurn Posted May 7, 2011 Share Posted May 7, 2011 What you mean replace the image map? Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211892 Share on other sites More sharing options...
brenda Posted May 7, 2011 Author Share Posted May 7, 2011 What I was thinking of was replacing the area of the image map within the image with the document that the user has written on. So he clicks on the image map, a document opens up for him to write into and then I wanted what he as written to replace the image map. The image is a tree and the idea is that various parts of the tree will become image maps. The person can write a word or two that explains what that part of the tree represents to them. At the end of the process there would be the image of the tree with a number of words written on it where the image maps had been. Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211895 Share on other sites More sharing options...
ZulfadlyAshBurn Posted May 7, 2011 Share Posted May 7, 2011 Hmm, that might that sometime for me to code. Can you give me the code you have now or the images you have? Does your server supports Php & MySQL? It might need mySQL database. Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211901 Share on other sites More sharing options...
brenda Posted May 7, 2011 Author Share Posted May 7, 2011 Here is the image and the coding I have done so far. If I can work out how to do it then I can create more image maps. So far I have only the one. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211906 Share on other sites More sharing options...
brenda Posted May 7, 2011 Author Share Posted May 7, 2011 Sorry I didn't answer your other question - yes both sql and php are supported by my server. thank you. Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211907 Share on other sites More sharing options...
ZulfadlyAshBurn Posted May 7, 2011 Share Posted May 7, 2011 use str_replace Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211910 Share on other sites More sharing options...
spiderwell Posted May 7, 2011 Share Posted May 7, 2011 to have actual text overlayed on an image, you need to maybe use this tutorial: http://www.phpfreaks.com/tutorial/php-add-text-to-image Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1211912 Share on other sites More sharing options...
brenda Posted May 7, 2011 Author Share Posted May 7, 2011 Thanks to both of you. Will do some (a lot more) more work on this and let you know the results. Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1212083 Share on other sites More sharing options...
brenda Posted May 8, 2011 Author Share Posted May 8, 2011 So far I can: 1. click on the image map and get a document to open so that the user can write their comments. This is done via the 'trial tree interactive.php' doc I have already uploaded; and 2. create a php document containing an image within a php document of those comments - see attachment for that bit of code. My problem now is how do I get the image within the php document to replace the image map when the image within the php document is not a jpeg, png or gif file? I would bwe SO grateful for help as I feel I am so close to the solution but just can't make that leap. Thanks [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1212293 Share on other sites More sharing options...
brenda Posted May 10, 2011 Author Share Posted May 10, 2011 PLEASE PLEASE can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/235759-image-map-question/#findComment-1213486 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.