Onmouseover help needed

Results 1 to 2 of 2

Thread: Onmouseover help needed

  1. #1
    Join Date
    Dec 1969
    Posts
    898

    Default Onmouseover help needed

    I would like to see some sample code for doing the following:<BR>1. When the visitor moves the mouse over text, it changes color.<BR>2. The onmouseover also updates a description window with information related to the "text button" selected.<BR><BR>I&#039ve done this by using onmouseover and onclick events connected to each "text button." I suspect that a function call is necessary, but I&#039m not sure of the javascript code needed to trigger the both events.<BR><BR>Thanks very much,<BR>Frank

  2. #2
    Chad Franklin Guest

    Default RE: Onmouseover help needed

    I did it like this. The description field is just another image with text.<BR><BR>&#060;script language="javascript"&#062;<BR>&#060;!-- hide script from old browsers<BR><BR>window.onerror = null;<BR><BR>var netscape = 0;<BR>var goodIE = 0;<BR>browserName = navigator.appName.substring(0,8);<BR>browserVer = parseFloat(navigator.appVersion);<BR>if (browserName == "Netscape" && browserVer &#062;= 3)<BR>{ netscape = 1; }<BR>if (browserName == "Microsof" && browserVer &#062;= 4)<BR>{ goodIE = 1; }<BR>// end error trapping code<BR><BR><BR>if (netscape &#124&#124 goodIE) {<BR><BR> pic1 = new Image(131,118);<BR> pic1.src = "Images/blank.jpg";<BR><BR> pic2 = new Image(131,118);<BR> pic2.src = "Images/Location_info.gif";<BR><BR> pic3 = new Image(131,118);<BR> pic3.src = "resscreen.gif";<BR><BR> pic4 = new Image(131,118);<BR> pic4.src = "intscreen.gif";<BR><BR> pic5 = new Image(131,118);<BR> pic5.src = "photoscreen.gif";<BR><BR> pic6 = new Image(131,118);<BR> pic6.src = "highscreen.gif";<BR><BR> pic7 = new Image(131,118);<BR> pic7.src = "searchscreen.gif";<BR><BR><BR> a1 = new Image(132,23); <BR> a1.src = "Images/homeon.gif"; <BR> a2 = new Image(132,23);<BR> a2.src = "Images/homeon1.gif";<BR><BR> b1 = new Image(132,23); <BR> b1.src = "Images/infon.gif"; <BR> b2 = new Image(132,23);<BR> b2.src = "Images/infon1.gif";<BR><BR> c1 = new Image (132,23);<BR> c1.src = "Images/grpson.gif";<BR> c2 = new Image (132,23);<BR> c2.src = "Images/grpson1.gif";<BR><BR> d1 = new Image(132,23);<BR> d1.src = "Images/progon.gif"; <BR> d2 = new Image(132,23);<BR> d2.src = "Images/progon1.gif";<BR><BR> e1 = new Image(132,23);<BR> e1.src = "highlights1.gif"; <BR> e2 = new Image(132,23);<BR> e2.src = "highlights2.gif";<BR><BR> f1 = new Image(132,23);<BR> f1.src = "search1.gif"; <BR> f2 = new Image(132,23);<BR> f2.src = "search2.gif";<BR><BR>}<BR><BR>function hiLite(imgDocID, imgObjName, imgDocID2, imgObjName2) {<BR>if (netscape &#124&#124 goodIE) {<BR> document.images[imgDocID].src = eval(imgObjName + ".src");<BR> document.images[imgDocID2].src = eval(imgObjName2 + ".src");<BR>}}<BR><BR>//end hiding --&#062;<BR>&#060;/script&#062;<BR>

Posting Permissions

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