Results 1 to 4 of 4

Thread: Mouse Over

  1. #1

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609

    Mouse Over

    i am wondering how to make it so when the users mouse is hovering over certain text an image will switch to one relevant to the text your mouse is over. i know its probably easy but can anyone please tell me how to do it ?

  2. #2
    scoutt
    Guest
    if you can wait until I get off work, about an hour form now, I have some code at home that will do that. unless somebody else can answer

  3. #3

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    k, i'll try and stay online as long as possible

  4. #4
    scoutt
    Guest
    sorry it took so long but you should beable to change a couple of things to do what you want. if not i can help.
    Code:
    <SCRIPT LANGUAGE = "JavaScript"> 
    
                   // Javascript Animation
                   // Script Genereated by Eyeball Animation code generator
                   // http://www.eyeball-design.com (freebie section)
    
                   <!-- hide 
    		
                   browserName = navigator.appName; 
                   browserVer = parseInt(navigator.appVersion); 
                   browser = "NotOk"; 
    
                   // Detect if Netscape or MSIE version is ok 
    
                   if (browserName == "Netscape" && browserVer >= 3) { browser = "ok"} 
                   if (browserName == "Microsoft Internet Explorer" && browserVer == 4) { browser =
                   "ok"} 
    
                   // Initialize your images
    
                   if (browser == "ok") { 
    
                        Link1= new Image(); Link1.src = "images/dclosed.gif"; 
                        Link1on = new Image(); Link1on.src = "images/dopen.gif"; 
                        Link2= new Image(); Link2.src = "images/dclosed.gif"; 
                        Link2on = new Image(); Link2on.src = "images/dopen.gif"; 
                        Link3= new Image(); Link3.src = "images/dclosed.gif"; 
                        Link3on = new Image(); Link3on.src = "images/dopen.gif"; 
                        Link4= new Image(); Link4.src = "images/dclosed.gif"; 
                        Link4on = new Image(); Link4on.src = "images/dopen.gif"; 
    
                   }
    
                   function swap(imgName,select) 
    
                   { if (browser == "ok") {imgOn = eval(select+ ".src"); 
                   document.images[imgName].src = imgOn; }} 
    
                   // --> </SCRIPT >
    and this is what triggers it
    Code:
    <table border=0 align=center>
    <tr>
    <TD valign=left>
                   <!-- Code for Link : gift three.jpg --> 
                   <a href="gift.html" 
                   onmouseover="swap('imgLink3','Link3on')" 
                   onmouseout="swap('imgLink3','Link3')">
                   <img name ="imgLink3" 
                   src= "images/dclosed.gif" border = 0 alt = "dopen.gif"></a>
    </TD>
    <TD valign=left>
                   <!-- Code for Link : gift four --> 
                   <a href="gift.html" 
                   onmouseover="swap('imgLink4','Link4on')" 
                   onmouseout="swap('imgLink4','Link4')">
                   <img name ="imgLink4" 
                   src= "images/dclosed.gif" border = 0 alt = "dopen.gif"></a>
    </TD>
    <TD valign=left>
    <!-- Code for Link : gift one --> 
                   <a href="gift.html" 
                   onmouseover="swap('imgLink1','Link1on')" 
                   onmouseout="swap('imgLink1','Link1')">
                   <img name ="imgLink1" 
                   src= "images/dclosed.gif" border = 0 alt = "dopen.gif"></a>
    </TD>
    <TD valign=left>
                   <!-- Code for Link : gift two --> 
                   <a href="gift.html" 
                   onmouseover="swap('imgLink2','Link2on')" 
                   onmouseout="swap('imgLink2','Link2')">
                   <img name ="imgLink2" 
                   src= "images/dclosed.gif" border = 0 alt = "dopen.gif"></a>
    </TD>
    
    </tr>
    </table>
    if not I have a script that uses a dropdown box and changes images when clicked

Posting Permissions

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



Click Here to Expand Forum to Full Width