...

View Full Version : CSS inside JS problem - I think



Tilt
08-22-2007, 02:38 AM
My code is below. I am trying to do three things that I am stuck on.
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.



<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>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum