I've had this problem before, but couldn't get it fixed. I have done a little experiment for an interactive menu using onmouseover and onmouseout. But it only works in Chrome, but I would like it to work in IE as well. Hope you can help.

<!DOCTYPE html>
<title>Menu Experiment</title>


<p><img src="menu.jpg" alt="Menu Screen" name="mainlogo" usemap="map1"/>

<map name="map1">
<area shape="rect" coords="0,0,120,59" href="main.html" onmouseover="document.mainlogo.src='homemenu.jpg'" onmouseout="document.mainlogo.src='menu.jpg'" />
<area shape="rect" coords="121,0,290,59" href="random.html" onmouseover="document.mainlogo.src='randommenu.jpg'" onmouseout="document.mainlogo.src='menu.jpg'" />
<area shape="rect" coords="122,0,479,59" href="aboutus.html" onmouseover="document.mainlogo.src='aboutusmenu.jpg'" onmouseout="document.mainlogo.src='menu.jpg'" />


Recommended Answers

All 3 Replies

What's it supposed to be doing? Is there a page to actually look at?

What's it supposed to be doing? Is there a page to actually look at?

No. It's a menu experiment. I used onmouseover and onmouseout to create an interactive menu. But it only works in Chrome, not IE

correct the doctype
html version dependent code fails

would likely be better in css than javascript, a large, and growing larger, proportion of users disable javascript as security risk, javascript menu doesnt work
css menus are much easier to code than image maps,
what happens when the user has the auto resize function (ie>7 ff=all saf=all) & the image is not the size you anticipate & coded for

Yeah I know paranoid, but if you plan for the worst, when **expletive** happens its only a pleasant suprise

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.