bilis_money Posted October 23, 2007 Share Posted October 23, 2007 Hi I want to know if how a javascript can recognize the name of a picture. Let say i have two pictures. Picture A. name is "bubble.jpg" ...then Picture B. name is "duck.jpg" When i hover the mouse using the onmouseover() function on one of the picture. The javascript should smart enough to recognize the name of the picture and display the name of that picture. Is this possible? If so, please could you show me some sample codes for this please. Thank you very much in advance. Link to comment https://forums.phpfreaks.com/topic/74398-recognizing-the-name-of-the-pictures-when-onmouseover/ Share on other sites More sharing options...
fenway Posted October 23, 2007 Share Posted October 23, 2007 Say what? You mean the .src or the .name? Link to comment https://forums.phpfreaks.com/topic/74398-recognizing-the-name-of-the-pictures-when-onmouseover/#findComment-376307 Share on other sites More sharing options...
nogray Posted October 23, 2007 Share Posted October 23, 2007 JS like any other programming language will do what you tell it. If you don't say what's the image src, the script can't find it. You can make a function and pass the image src to the function <a href="#" onmouseover="do_something('bubble.jpg');">Some text</a> This way your function will take the source image and do what it needs using that. Link to comment https://forums.phpfreaks.com/topic/74398-recognizing-the-name-of-the-pictures-when-onmouseover/#findComment-376336 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.