addtrain Posted August 9, 2007 Share Posted August 9, 2007 hey its me agian... anyway, i dont know if this would be in PHP, HTML, Java, or what. what i want to do is have a picture. once someone clicks on it, the picture changes. NO ONMOUSEOVER, ONCLCIK! plz help thank u! Quote Link to comment https://forums.phpfreaks.com/topic/64171-solved-okplease-helpagian/ Share on other sites More sharing options...
SirChick Posted August 9, 2007 Share Posted August 9, 2007 you could do this with html .... theres free scripts for this on dynamicdrive.com Quote Link to comment https://forums.phpfreaks.com/topic/64171-solved-okplease-helpagian/#findComment-319805 Share on other sites More sharing options...
teng84 Posted August 9, 2007 Share Posted August 9, 2007 AJAX is the solution or if its ok to refresh the page to obtain yout objective then use the link in that image then use the get variable Quote Link to comment https://forums.phpfreaks.com/topic/64171-solved-okplease-helpagian/#findComment-319809 Share on other sites More sharing options...
Fadion Posted August 10, 2007 Share Posted August 10, 2007 No onmouseover, no onclick? lol then how are u supposed to make it? Dont know of how are u going to specify the image filename, but u could use just onclick="imageId.src='newImage.jpg'". Quote Link to comment https://forums.phpfreaks.com/topic/64171-solved-okplease-helpagian/#findComment-319819 Share on other sites More sharing options...
SirChick Posted August 10, 2007 Share Posted August 10, 2007 No onmouseover, no onclick? lol then how are u supposed to make it? Dont know of how are u going to specify the image filename, but u could use just onclick="imageId.src='newImage.jpg'". think he meant "not onmouseover .. but on click" lol Quote Link to comment https://forums.phpfreaks.com/topic/64171-solved-okplease-helpagian/#findComment-319822 Share on other sites More sharing options...
Fadion Posted August 10, 2007 Share Posted August 10, 2007 think he meant "not onmouseover .. but on click" lol Oh ok then, my fault Quote Link to comment https://forums.phpfreaks.com/topic/64171-solved-okplease-helpagian/#findComment-319839 Share on other sites More sharing options...
addtrain Posted August 10, 2007 Author Share Posted August 10, 2007 wow thanks all! just for the record i did mean 'no mouseover, BUT onclick' lol can anyone give me an example? Quote Link to comment https://forums.phpfreaks.com/topic/64171-solved-okplease-helpagian/#findComment-319877 Share on other sites More sharing options...
Fadion Posted August 10, 2007 Share Posted August 10, 2007 try this <img name="myImg" src="image1.jpg" /> <a href="javascript://swap" onclick="document.getElementById('myImg').src='image2.jpg';">Swap Image</a> The href thing is just for fun, it actually doesnt matter. Quote Link to comment https://forums.phpfreaks.com/topic/64171-solved-okplease-helpagian/#findComment-319884 Share on other sites More sharing options...
addtrain Posted August 10, 2007 Author Share Posted August 10, 2007 hey thanks all for the replys , the last post by GuiltyGear really helped. try this Code: <img name="myImg" src="image1.jpg" /> <a href="javascript://swap" onclick="document.getElementById('myImg').src='image2.jpg';">Swap Image</a> The href thing is just for fun, it actually doesnt matter. thank you all a bunch if anyone needs help on myspace, just ask me i have over 400 friends, and still gaining more. this topic is SOLVED! Quote Link to comment https://forums.phpfreaks.com/topic/64171-solved-okplease-helpagian/#findComment-319889 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.