K
Ken Tuck
Hi
The following functions are working propery for IE, Ns 4.x and NS 6+ but
the image I want to display disappears in IE. Why?
function swapPic(layer,imgName,imgObj) {
o = (n &&
layer?document.layers[layer].document.images[imgName]:document.images[imgName]);
if(!o.hasswapped) o.src = eval(imgObj+".src");
}
var oRef = null;
var oRefImg = null;
function keepPic(layer,imgName,imgObj) {
if(oRef) {
// swap image back
oRef.src = oRefImg;
}
if (document.images) {
o = (n &&
layer?document.layers[layer].document.images[imgName]:document.images[imgName]);
if(o) {
oRef = o
oRefImg = o.src;
o.src = eval(imgObj+".src");
o.hasswapped = true;
}
}
}
I use the following link to chose the image I want to display
<area shape="poly" alt="" coords="25,25,21,0,30,0"
href="javascript:void(0)" title=""
onMouseOver="swapPic('metera','diala','img1');"
onClick="keepPic('metera','diala','img1');">
<div id="metera"><img src="images/pointer.aa.gif" alt="" name="diala"
id="diala" width="50" height="50" border="0" usemap="#dialita"></div>
The image map is a dial with 20 positions on it to display a position on
a dial
--
Cheers!
Ken Tuck
EyeCreate Inc.
Web Site Design | Online Applications | E-Commerce
ph: 705 755-1120
fx: 705 743-9259
http://www.eyecreate.net/
The following functions are working propery for IE, Ns 4.x and NS 6+ but
the image I want to display disappears in IE. Why?
function swapPic(layer,imgName,imgObj) {
o = (n &&
layer?document.layers[layer].document.images[imgName]:document.images[imgName]);
if(!o.hasswapped) o.src = eval(imgObj+".src");
}
var oRef = null;
var oRefImg = null;
function keepPic(layer,imgName,imgObj) {
if(oRef) {
// swap image back
oRef.src = oRefImg;
}
if (document.images) {
o = (n &&
layer?document.layers[layer].document.images[imgName]:document.images[imgName]);
if(o) {
oRef = o
oRefImg = o.src;
o.src = eval(imgObj+".src");
o.hasswapped = true;
}
}
}
I use the following link to chose the image I want to display
<area shape="poly" alt="" coords="25,25,21,0,30,0"
href="javascript:void(0)" title=""
onMouseOver="swapPic('metera','diala','img1');"
onClick="keepPic('metera','diala','img1');">
<div id="metera"><img src="images/pointer.aa.gif" alt="" name="diala"
id="diala" width="50" height="50" border="0" usemap="#dialita"></div>
The image map is a dial with 20 positions on it to display a position on
a dial
--
Cheers!
Ken Tuck
EyeCreate Inc.
Web Site Design | Online Applications | E-Commerce
ph: 705 755-1120
fx: 705 743-9259
http://www.eyecreate.net/