I'm running a script on my website at which loads thumbnails from an array into anchors. It works fine in ie but doesn't work in Firefox - anyone know why?
Cheers
Andy
Array:
mypicarray = new Array("M81 - Bodes Galaxy","SkyWatcher 200, Hx916","L - 2 mins binned 1x1, RG - 1 min binned 2x2, B - 70 secs binned 2x2","images/hx916/dso/m81.jpg","images/hx916/dso/thumbs/m81thumb.jpg","M82 - Cigar Galaxy","SkyWatcher 200, Hx916","L - 3 mins binned 1x1, RGB - 2 mins binned 2x2","images/hx916/dso/m82.jpg","images/hx916/dso/thumbs/m82thumb.jpg","M63 - Sunflower Galaxy","SkyWatcher 200, Hx916","L - 3 mins binned 1x1, RGB - 2 mins binned 2x2","images/hx916/dso/m63final.jpg","images/hx916/dso/thumbs/m63finalthumb.jpg","M3 - Globular Cluster","SkyWatcher 200, Hx916","","images/hx916/dso/m3.jpg","images/hx916/dso/thumbs/m3thumb.jpg","M108 - Galaxy","SkyWatcher 200, Hx916","L - 3 mins binned 1x1, RGB - 2 mins binned 2x2","images/hx916/dso/m108.jpg","images/hx916/dso/thumbs/m108thumb.jpg","Christmas Tree Cluster and Cone Nebula","SkyWatcher ST102, Hx916","Ha - 10min, 20min subs, GB - 1 min binned 2x2","images/hx916/dso/xmascone.jpg","images/hx916/dso/thumbs/xmasconethumb.jpg");
Code:
function loader()
{
for(i = 5;i<mypicarray.length + 1;i = i + 5)
{
maintitle = mypicarray[i-5];
mypic = mypicarray[i-2];
mythumb = mypicarray[i-1];
imgstr = "<img src='" + mythumb + "' width=200 alt='" + maintitle + "' border=0 onClick='javascript:gopic(" + (i-2) + ")'>";
eval("andy" + (i/5) + ".innerHTML = \"" + imgstr + "\";");
}
return;
}
function gopic(mypic)
{
window.location.href = "pic.htm?mypic=" + mypic;
return;
}
HTML:
<a name="andy1"></a> <a name="andy2"></a> <a name="andy3"></a><br> (etc...)
Cheers
Andy
Array:
mypicarray = new Array("M81 - Bodes Galaxy","SkyWatcher 200, Hx916","L - 2 mins binned 1x1, RG - 1 min binned 2x2, B - 70 secs binned 2x2","images/hx916/dso/m81.jpg","images/hx916/dso/thumbs/m81thumb.jpg","M82 - Cigar Galaxy","SkyWatcher 200, Hx916","L - 3 mins binned 1x1, RGB - 2 mins binned 2x2","images/hx916/dso/m82.jpg","images/hx916/dso/thumbs/m82thumb.jpg","M63 - Sunflower Galaxy","SkyWatcher 200, Hx916","L - 3 mins binned 1x1, RGB - 2 mins binned 2x2","images/hx916/dso/m63final.jpg","images/hx916/dso/thumbs/m63finalthumb.jpg","M3 - Globular Cluster","SkyWatcher 200, Hx916","","images/hx916/dso/m3.jpg","images/hx916/dso/thumbs/m3thumb.jpg","M108 - Galaxy","SkyWatcher 200, Hx916","L - 3 mins binned 1x1, RGB - 2 mins binned 2x2","images/hx916/dso/m108.jpg","images/hx916/dso/thumbs/m108thumb.jpg","Christmas Tree Cluster and Cone Nebula","SkyWatcher ST102, Hx916","Ha - 10min, 20min subs, GB - 1 min binned 2x2","images/hx916/dso/xmascone.jpg","images/hx916/dso/thumbs/xmasconethumb.jpg");
Code:
function loader()
{
for(i = 5;i<mypicarray.length + 1;i = i + 5)
{
maintitle = mypicarray[i-5];
mypic = mypicarray[i-2];
mythumb = mypicarray[i-1];
imgstr = "<img src='" + mythumb + "' width=200 alt='" + maintitle + "' border=0 onClick='javascript:gopic(" + (i-2) + ")'>";
eval("andy" + (i/5) + ".innerHTML = \"" + imgstr + "\";");
}
return;
}
function gopic(mypic)
{
window.location.href = "pic.htm?mypic=" + mypic;
return;
}
HTML:
<a name="andy1"></a> <a name="andy2"></a> <a name="andy3"></a><br> (etc...)