This is an update from a previous post, I just simplified the code.
It seems that I can't get the image map to work with IE7. The page is
located here http://www.theknopps.com/test.html and the source below.
I can't seem to figure out why IE7 won't recognize the image map. Thanks
for your help
Ryan
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Hello</title>
<script type='text/javascript'>
window.onload = function(){
var div = document.getEle mentById("blah" );
var img = document.getEle mentById("img") ;
if(!img){
img = document.create Element("img");
img.setAttribut e("src", "goodies/stuff/disco_stu.jpg") ;
img.setAttribut e("id", "i-4-4");
img.setAttribut e("usemap", "#m-1-1");
img.setAttribut e("alt", "");
div.appendChild (img);
}
imgmap = document.getEle mentById("m-1-1");
if(!imgmap){
var imgmap = document.create Element("map");
imgmap.setAttri bute("id", "m-1-1");
imgmap.setAttri bute("name", "m-1-1");
var area = document.create Element("area") ;
area.setAttribu te("alt", "");
area.setAttribu te("href", "http://google.com");
area.setAttribu te("shape", "circle");
area.setAttribu te("coords", "20,20,10") ;
imgmap.appendCh ild(area);
div.appendChild (imgmap);
}
}
</script>
</head>
<body>
<div id='blah'></div>
</body>
</html>
It seems that I can't get the image map to work with IE7. The page is
located here http://www.theknopps.com/test.html and the source below.
I can't seem to figure out why IE7 won't recognize the image map. Thanks
for your help
Ryan
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Hello</title>
<script type='text/javascript'>
window.onload = function(){
var div = document.getEle mentById("blah" );
var img = document.getEle mentById("img") ;
if(!img){
img = document.create Element("img");
img.setAttribut e("src", "goodies/stuff/disco_stu.jpg") ;
img.setAttribut e("id", "i-4-4");
img.setAttribut e("usemap", "#m-1-1");
img.setAttribut e("alt", "");
div.appendChild (img);
}
imgmap = document.getEle mentById("m-1-1");
if(!imgmap){
var imgmap = document.create Element("map");
imgmap.setAttri bute("id", "m-1-1");
imgmap.setAttri bute("name", "m-1-1");
var area = document.create Element("area") ;
area.setAttribu te("alt", "");
area.setAttribu te("href", "http://google.com");
area.setAttribu te("shape", "circle");
area.setAttribu te("coords", "20,20,10") ;
imgmap.appendCh ild(area);
div.appendChild (imgmap);
}
}
</script>
</head>
<body>
<div id='blah'></div>
</body>
</html>
Comment