How to validate onmouseover?
Tried this; no go!PHP Code:<a href="page.php" onmouseover="showtext('<div style="padding-left:40px"><a href=\'link1.php\'>Link1</a> | <a href=\'link2.php\'>Link2</a> | <a href=\'link3.php\'>Link3</a></div>','a', 'No')" onmouseout="hidetext()">Page1</a><img src="img/submenu.gif" alt=" " name="a" border="0" />
This does not validate, other options I have are to code / find a CSS menu equal or figure out how to validate this.PHP Code:<a href="page.php" onmouseover="showtext("<div style="padding-left:40px"><a href=\"link1.php\">Link1</a> | <a href=\"link2.php\">Link2</a> | <a href=\"link3.php\">Link3</a></div>","a", "No")" 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="" } //]]>



Reply With Quote


Bookmarks