addtrain Posted August 11, 2007 Share Posted August 11, 2007 i am just completely stuck on something with my website. i have this script, where i have the code checks to see if someone has clicked on the image. but to do what i want to do on my website i need to have 2 onclick()s in the same peice of code. here is what the code looks like: <img id="myImage" src="myimage.jpg" onclick="changeSrc()" onclick='img1=true;check();' /> as you can see, i have 2 onclicks, changeSrc() and img1=true;check(); <img id="myImage" src="myimage.jpg" onclick="changeSrc()" onclick='img1=true;check();' /> is this possible, to have 2 onclicks in one peice of script? if not, how do i combine them? is it a problem with image id? PLEASE HELP! Link to comment https://forums.phpfreaks.com/topic/64402-solved-aggg-im-stuck/ Share on other sites More sharing options...
php_tom Posted August 11, 2007 Share Posted August 11, 2007 Maybe I don't understand the question... but can't you just do: <img id="myImage" src="myimage.jpg" onclick='changeSrc();img1=true;check();' /> Link to comment https://forums.phpfreaks.com/topic/64402-solved-aggg-im-stuck/#findComment-321100 Share on other sites More sharing options...
addtrain Posted August 11, 2007 Author Share Posted August 11, 2007 haha, thanks a lot, this really helped! i didnt know that you could do that.... Link to comment https://forums.phpfreaks.com/topic/64402-solved-aggg-im-stuck/#findComment-321102 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.