Z
zoookapi
I'm attempting to dynamically add a link so I can take a mouseover
action on it and am having problems in Safari (this works fine in
Firefox and IE (Windows version of IE)). When I add the img object it
shows fine, but when I try to contain it within a link, it does not
display. I've tried using the IE and non-IE method below but neither
seem to work. Is this a bug in Safari or is there a different way to
achieve this? I was testing with Safari 1.3.2 on OS X 10.3.x
if (!isIE) {
oldImage = document.createElement("img");
oldImage.src = value;
oldImage.title = "";
newImage = document.createElement("link");
newImage.appendChild(oldImage);
} else {
newImage = document.createElement("<img src='" + value + " '
title='" + "" + "'>");
}
newImage.onmouseover = function(){
takeAction();
};
newImage.onmouseout = function(){
takeAction();
}
Thanks,
Steve
action on it and am having problems in Safari (this works fine in
Firefox and IE (Windows version of IE)). When I add the img object it
shows fine, but when I try to contain it within a link, it does not
display. I've tried using the IE and non-IE method below but neither
seem to work. Is this a bug in Safari or is there a different way to
achieve this? I was testing with Safari 1.3.2 on OS X 10.3.x
if (!isIE) {
oldImage = document.createElement("img");
oldImage.src = value;
oldImage.title = "";
newImage = document.createElement("link");
newImage.appendChild(oldImage);
} else {
newImage = document.createElement("<img src='" + value + " '
title='" + "" + "'>");
}
newImage.onmouseover = function(){
takeAction();
};
newImage.onmouseout = function(){
takeAction();
}
Thanks,
Steve