WebAIM - Web Accessibility In Mind

E-mail List Archives

(no subject)

for

From: Brent Clark
Date: May 6, 2005 6:45AM


Hi all

I have a javascript function:

function pframe(numb){
var MyMap = "/images/index/map_"+numb+".gif";
document['map'].src=MyMap;
misc = "";
for(a = 0; a < sarray[numb].length; a++){
misc += (sarray[numb][a]);
}
//alert(misc);
document.getElementById('mainpage').innerHTML = "";
document.getElementById('mainpage').innerHTML = misc;
//alert("/images/index/"+numb+"-1.jpg");
document['pic1'].src="/images/index/"+numb+"-1.jpg";
document['pic2'].src="/images/index/"+numb+"-2.jpg";
document['pic3'].src="/images/index/"+numb+"-3.jpg";
document['pic4'].src="/images/index/"+numb+"-4.jpg";
misc = "";
MyMap = "";
}

But for some reason or other the pics dont get loaded correctly

if I keep clicking the link (has the onclick="pframe()") about three times.
Then only does the pics appear.

If anyone could assist it would be most appreciated.

Kind Regards
Brent Clark