My code is below. The menu image (menu.gif) is mapped so that different buttons (all within the one gif) display different text in the main area/window. I am trying to do three things that I am stuck on;
I'm trying to insert an anchor and/or an image tag between <span> tags does, but it will not work, and I don't know how to accomplish that.
Also, the page displays in Firefox, but the JavaScript doesn't seem to work, and I can't figure that out either.
This is my first page in several years, and I know browsers have changed a good bit since the last time I tried to build one, but please go easy on me - I'm trying.
Three issues:
1. Insert an image file where the "*****" is
2. Insert an anchor tag/link where the "*****" is
3. Make this whole page work in Firefox.
If anyone could help, I would greatly appreciate it.
I condensed the code as best I could:
<html>
<head>
<script language=JavaScript>
<!--
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
function layerWrite(id,nestref,text) {
if (ns4) {
var MyLayr =
(nestref)? eval('document.'+nestref+
'.document.'+id+'.document')
: document.layers[id].document
MyLayr.open()
MyLayr.write(text)
MyLayr.close()
}
else if (ie4) document.all[id].innerHTML = text
}
//-->
</script>
<style type="text/css">
.areamap {
background-image: url(clouds.gif);
left: 0px;
top: 0px;
}
#genDiv {
background-color: #FFFFFF;
height: 30px;
left: 0px;
position: relative;
top: 0px;
layer-background-color: #004080
}
</style>
</head>
<body>
<img src="menu.gif" usemap="#menu">
<map name="menu">
<area shape="rect" coords="0,60,96,87" href="javascript:layerWrite('genDiv',null,'<span%20class=\'areamap\'>*****</span>')"
title="">
<area shape="default" nohref>
</map>
</body>
</html>
I'm trying to insert an anchor and/or an image tag between <span> tags does, but it will not work, and I don't know how to accomplish that.
Also, the page displays in Firefox, but the JavaScript doesn't seem to work, and I can't figure that out either.
This is my first page in several years, and I know browsers have changed a good bit since the last time I tried to build one, but please go easy on me - I'm trying.
Three issues:
1. Insert an image file where the "*****" is
2. Insert an anchor tag/link where the "*****" is
3. Make this whole page work in Firefox.
If anyone could help, I would greatly appreciate it.
I condensed the code as best I could:
<html>
<head>
<script language=JavaScript>
<!--
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
function layerWrite(id,nestref,text) {
if (ns4) {
var MyLayr =
(nestref)? eval('document.'+nestref+
'.document.'+id+'.document')
: document.layers[id].document
MyLayr.open()
MyLayr.write(text)
MyLayr.close()
}
else if (ie4) document.all[id].innerHTML = text
}
//-->
</script>
<style type="text/css">
.areamap {
background-image: url(clouds.gif);
left: 0px;
top: 0px;
}
#genDiv {
background-color: #FFFFFF;
height: 30px;
left: 0px;
position: relative;
top: 0px;
layer-background-color: #004080
}
</style>
</head>
<body>
<img src="menu.gif" usemap="#menu">
<map name="menu">
<area shape="rect" coords="0,60,96,87" href="javascript:layerWrite('genDiv',null,'<span%20class=\'areamap\'>*****</span>')"
title="">
<area shape="default" nohref>
</map>
</body>
</html>