Log in

View Full Version : Rollover image for another image and text



TAN
07-30-2006, 11:15 AM
I am new to this site and this is the 2nd time I send the message. I am unable to check whether or not my earlier message was posted.

Who should be the recipient, me or the person I want to post this message to? If it is another person, how should I out?


<CENTER>
<table border=3 cellpadding=5 width=50>
<tr><td colspan=2 rowspan=9 valign="top" height=50 width=250><img border="2" src=" imageT4.jpg " name="R1" border="10"height=50 width=300></td><td><img border="2" src=" imagesT4.jpg " name="R2"></td></tr>
<tr><td><img border="2" src=" imageT4.jpg " name="R3">

</table>
<table>

<tr><td><img border="2" src="imageT1.jpg" name="R5" onMouseOver='R1.src=" imageT1.jpg ",R2.src=" imageT2.jpg ",R3.src=" imageT4.jpg "' onMouseOut='R1.src="imageT4.jpg ",R2.src=" imageT4.jpg ",R3.src=" imageT4.jpg "'></td><td align="middle"><img border="2" src="imageT2.jpg" name="R6" onMouseOver='R1.src=" imageT1.jpg ",R2.src=" imageT1.jpg ",R3.src=" imageT1.jpg "' onMouseOut='R1.src=" imageT4.jpg ",R2.src=" imageT4.jpg ",R3.src=" imageT4.jpg "'></td><td align="middle"></tr>
</table>
</CENTER>

Question:

When I onMouseOver to R5 and R6, R1 to R3 will display iamges. Right now I just want R2 and R3 diplay text instead of image. How to do it?

mburt
07-30-2006, 03:55 PM
Whoa.. This is a huge mess, I'm not clear on what you're trying to ask either. If you are trying to replace a text with an image, the best way to do it is to put it in a div, and swap the innerHTML with "<img>" and text.

TAN
07-31-2006, 12:06 AM
Basically what I need is when I rollover to image1, image3 and text3 will appear in a specified location, if I rollover image2, image3 and text3 will change accordingly.

djr33
07-31-2006, 10:11 AM
That would be something like this:

<img name="1" onMouseover="change3('settings');">
...
<div id="3">(content will appear here.)</div>

And you'd need a javascript function called "change3' where it changes div "3" to the "settings".
You'd also want an onMouseout.

Remote rollovers are totally different and have nothing to do with the traditional code for rollovers.


Also, you could do it like:

<img onMouseover="document.3.src='new.jpg';">
<img name="3" src="old.jpg">

That's oversimplified, and likely wrong, but the right idea.


Sorry i'm not more helpful... not a javascript expert and I'm really tired.

BLiZZaRD
07-31-2006, 10:14 AM
Yes, but why the poll? :p

TAN
07-31-2006, 10:33 AM
Thank you for your info. I am still trying to find out how to make it.

Regarding the poll, sorry, press the wrong button already.

djr33
07-31-2006, 10:36 AM
Well, personally, I feel the answer is "2", so I'll be honest with you and tell you that's what I voted for. :p
hehe.


So... that should get you on the right track.

The second option is a bit easier, but won't work for changing text.

(The easiest way would be to use an iframe and change it's src based on mouseovers, but that would be a bit awkward as iframes can get in the way.)

BLiZZaRD
07-31-2006, 10:39 AM
Regarding the poll, sorry, press the wrong button already.


LOL I just thought it was funny... 4 options and 2 are the same. I voted for 1 because I prefer to not have options all the time. Just give it to me already! HAHAHAHAHAHA

techno_race
03-03-2007, 03:20 PM
What exactly is the poll asking!?

ddadmin
03-04-2007, 07:29 AM
Poll removed.

techno_race
03-04-2007, 02:42 PM
Thanks - even though the poll was closed, I couldn't figure out what 1, 1, 2 and 2 were.