View Single Post
Old 10-28-2008, 08:52 AM   #4
student101
 
Join Date: Dec 2007
Posts: 379
Post

How does this work? on your browser...
PHP Code:
<a href="page.php" onmouseover="showtext(&quot;&lt;div style=&quot;padding-left:40px&quot;&gt;&lt;a href=\&quot;link1.php\&quot;&gt;Link1&lt;/a&gt; | &lt;a href=\&quot;link2.php\&quot;&gt;Link2&lt;/a&gt; | <a href=\&quot;link3.php\&quot;&gt;Link3&lt;/a&gt;&lt;/div&gt;&quot;,&quot;a&quot;, &quot;No&quot;)" onmouseout="hidetext()">Page1</a><img src="img/submenu.gif" alt=" " name="a" border="0" /> 
JavaScript Document;
Code:
 
//<![CDATA[
image1 = new Image
image2 = new Image
image1.src = 'img/submenu.gif'
image2.src = 'img/submenu_o.gif'
var baseopacity=0
function change(imagename, shop) {
document.a.src=image1.src
document.b.src=image1.src
document.c.src=image1.src
document.d.src=image1.src
if(shop=="Yes") {
document.e.src=image1.src
}
if (imagename == "a") {document.a.src=image2.src;
} else if (imagename == "b") {document.b.src=image2.src;
} else if (imagename == "c") {document.c.src=image2.src;
} else if (imagename == "d") {document.d.src=image2.src;
} else if (imagename == "e") {document.e.src=image2.src;
}
//document[imagename].src=image2.src
}
function showtext(thetext, imagename, shop){
if (!document.getElementById)
return
textcontainerobj=document.getElementById("menu_b")
browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
document.getElementById("menu_b").innerHTML=thetext
change(imagename, shop)
instantset(100)
}
function notext(){
document.getElementById("menu_b").innerHTML=""
}
function hidetext(){
// instantset(baseopacity)
}
function instantset(degree){
if (browserdetect=="mozilla")
textcontainerobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
textcontainerobj.filters.alpha.opacity=degree
else if (document.getElementById && baseopacity==0)
document.getElementById("menu_b").innerHTML=""
}
//]]>
__________________
Amateurs ... Built the ark.
Professionals ... Built the Titanic.
specificity [sound like spe-sifis-ity]
student101 is offline   Reply With Quote