WebGeek Posted December 16, 2002 Posted December 16, 2002 Is there a way to make the buttons in osCommerce rollovers like the ones in the upper left hand corner of this page? I haven't lost my mind, I have it backed up on disk, somewhere...
blueline Posted December 17, 2002 Posted December 17, 2002 You can use javascript if you want. Just edit your header.php file accordingly. <html><head> <title>Your Document Title Goes Here</title> <script language="javascript"> <!-- hide script from old browsers //detect browser: browserName = navigator.appName; browserVer = parseInt(navigator.appVersion); if (browserName == "Netscape" && browserVer >= 3) browserVer = "1"; else if (browserName == "Microsoft Internet Explorer" && browserVer == 4) browserVer = "1"; else browserVer = "2"; //preload images: if (browserVer == 1) { a1 = new Image(107,36); a1.src = "a1.jpg"; a2 = new Image(107,36); a2.src = "a2.jpg"; } //image swapping function: function hiLite(imgDocID, imgObjName, comment) { if (browserVer == 1) { document.images[imgDocID].src = eval(imgObjName + ".src"); window.status = comment; return true; }} //end hiding --> </script> </head> <body background="some_image.jpg" text="#000000" link="#ff0000" alink="#00ff00" vlink="#0000ff"> All the body docs go here. Really just add the <script>STUFF</script> into the <head> tags, and the image script below anywhere in the body you want. <a href="mouseover.html" onMouseOver="hiLite('a','a2','Your Comment Here')" onMouseOut="hiLite('a','a1','')"><img name="a" src="a1.jpg" border=0 width=107 height=36></a> </body> </html> Hope this helps, -Chris Chris Sullivan
Recommended Posts
Archived
This topic is now archived and is closed to further replies.