PDA

View Full Version : ie6 hangs when javascript function called from flash file



ramkumar.doit
10-10-2008, 01:36 PM
hi dear friends. this is my first site http://www.aimschennai.in .. i used flash menu and html. i called javascript function from flash as

javascript:showlayer(1);

showlayer is my function name and 1 is argument. used 15 div layers and i hided and when user clicks that button corresponding layer will be shown and that java script is as follows



function showlayer(layername)
{
var f;
document.getElementById('pgframe').height=570;
document.getElementById('pgframe').width=630;
bobexample.sweepToggle('contract');
bobexampl.sweepToggle('contract');
bobexamp.sweepToggle('contract');
bob.sweepToggle('contract');
bob1.sweepToggle('contract');
bobexample.sweepToggle1('expand',0);
bobexampl.sweepToggle1('expand',0);
bobexamp.sweepToggle1('expand',0);
bob.sweepToggle1('expand',0);
bob1.sweepToggle1('expand',0);

switch(layername)
{
case 1:
document.title="AIMS Private Limited - About Us";
document.getElementById(10).style.display = "none";
document.getElementById(1).style.display = "block";
document.getElementById(2).style.display = "none";
document.getElementById(3).style.display = "none";
document.getElementById(4).style.display = "none";
document.getElementById(5).style.display = "none";
document.getElementById(6).style.display = "none";
document.getElementById(7).style.display = "none";
document.getElementById(8).style.display = "none";
document.getElementById(9).style.display = "none";
document.getElementById(11).style.display = "none";
document.getElementById(12).style.display = "none";
document.getElementById(13).style.display = "none";
document.getElementById(14).style.display = "none";
document.getElementById(15).style.display = "none";
break;
case 2:
document.title="AIMS Private Limited - Institutional Division";
document.getElementById(10).style.display = "none";
document.getElementById(1).style.display = "none";
document.getElementById(2).style.display = "block";
document.getElementById(3).style.display = "none";
document.getElementById(4).style.display = "none";
document.getElementById(5).style.display = "none";
document.getElementById(6).style.display = "none";
document.getElementById(7).style.display = "none";
document.getElementById(8).style.display = "none";
document.getElementById(9).style.display = "none";
document.getElementById(11).style.display = "none";
document.getElementById(12).style.display = "none";
document.getElementById(13).style.display = "none";
document.getElementById(14).style.display = "none";
document.getElementById(15).style.display = "none";
break;
case 3:
document.title="AIMS Private Limited - Industrial Division";
document.getElementById(10).style.display = "none";
document.getElementById(1).style.display = "none";
document.getElementById(2).style.display = "none";
document.getElementById(3).style.display = "block";
document.getElementById(4).style.display = "none";
document.getElementById(5).style.display = "none";
document.getElementById(6).style.display = "none";
document.getElementById(7).style.display = "none";
document.getElementById(8).style.display = "none";
document.getElementById(9).style.display = "none";
document.getElementById(11).style.display = "none";
document.getElementById(12).style.display = "none";
document.getElementById(13).style.display = "none";
document.getElementById(14).style.display = "none";
document.getElementById(15).style.display = "none";
break;
}

}


the problem in FF and IE it works fine but it sucks in IE6 .. when i clicked first time it works and seconds time menu gets strucked and its not working.. please help me to fix this issue