Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Rollover image for another image and text

  1. #1
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Rollover image for another image and text

    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?

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    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.
    - Mike

  3. #3
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 'Rollover image for another image and text'

    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.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Yes, but why the poll?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. #6
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, personally, I feel the answer is "2", so I'll be honest with you and tell you that's what I voted for.
    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.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by TAN
    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
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  9. #9
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    What exactly is the poll asking!?

  10. #10
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Poll removed.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •