By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,743 Members | 804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,743 IT Pros & Developers. It's quick & easy.

image changes when we point with mouse, how?

P: 19
I am desiging some webpages.

so if we see this website www.symphonysv.com,
there we can see some text in the middle row. when we point those texts with mouse, the image in the side changes.

How to do this...........
can u give some code example.......

Thanks,
Vinutha.
Dec 8 '06 #1
Share this Question
Share on Google+
3 Replies


P: 8
var newimage =new Image(); newimage.src=//the url of the new image
function suffleimg(){
document.images.oldimage.src=newimage.src;
}

<td id="middletext" on mouseover="suffleimage()">the text in the middle</td>

of course you still have to add the onmouseout to restore the orignal one...
Dec 8 '06 #2

P: 19
Hi Johny,

Thanks for your code.
I have tried this but its giving some error like this,
"doument.images.oldimage" is null or not an object.

How to resolve this..........

Thanks,
Vinutha.
Dec 11 '06 #3

P: 8
Hi Johny,

Thanks for your code.
I have tried this but its giving some error like this,
"doument.images.oldimage" is null or not an object.

How to resolve this..........

Thanks,
Vinutha.
You've assigned the proper id's to the image and the td? maybe paste it here.
Dec 11 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.