Hi Experts,
I am having some trouble with a scrip working in Mozilla which works fine in MS Internet Explorer.
On a page I have a main image and a number of thumbnail images. A typical thumbnail image has the following html associated with it:
<a
href="jpeg_files/pic_lands
cape_w&w_0
3.jpg" class=content-thumb
onClick="return showPic(this,311,454)" onMouseOver="movein(this,'
Dove Lake','Tasmania','')" onMouseOut="moveout(this)"
><img
src="jpeg_files/pic_landsc
ape_w&w_tm
b_03.jpg" width="50" height="50" border="0"></a>
As you can see, there is a onMouseOver and an OnMouseOut which works fine but the onClick is the problem. When you click the thumbnail it executes the following Javascript:
function showPic (whichpic,iwidth,iheight) {
if (document.getElementById) {
document.getElementById('p
laceholder
').src = whichpic.href;
document.getElementById('p
laceholder
').width = iwidth;
document.getElementById('p
laceholder
').height = iheight;
alert (reference)
alert (whichpic.alt)
alert (whichpic.href)
boxdescription_1a.innerHTM
L=document
.getElemen
tById('box
descriptio
n_1').inne
rHTML
boxdescription_2a.innerHTM
L=document
.getElemen
tById('box
descriptio
n_2').inne
rHTML
boxdescription_3a.innerHTM
L=document
.getElemen
tById('box
descriptio
n_3').inne
rHTML
if (whichpic.title) {
document.getElementById('d
esc').chil
dNodes[0].
nodeValue = whichpic.title;
} else {
document.getElementById('d
esc').chil
dNodes[0].
nodeValue = whichpic.childNodes[0].nod
eValue;
}
return false;
} else {
return true;
}
}
In Internet Explorer, it works fine
. The image placeholder is resized and the images source is changed to the href of the thumbnail.
In Mozilla, it also does the above
. But it then goes a step further and invokes the href and opens the image (in the above case: jpeg_files/pic_landscape_w
&w_03.jpg)
into a screen of its own
. as I guess you would expect it would do if all the javascript stuff wasn't there....
Does anyone have any suggestions to this problem in Mozilla?