views:

48

answers:

2

iam using simple blow up trick in my page . first the div is set as hidden and then when we click the image ,a blow up opens with a overlay image in the background. The javascript function simply seta innerhtml. This all runs fine in mozilla but it gives unknown runtime error when i try to see it in IE6 and thats why image blow up doesnt work.what could be the possible reason for this???

EDIT : this is the example of the code im using :-

function Blowups(arrs,flag,nums,img_nm)
{
var h = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
var pheight = document.getElementsByTagName('html')[0].scrollHeight;
var myHeight = document.documentElement.clientHeight;
var div1 = document.getElementById('mr');
var div2 = document.getElementById('disp');
var prev='';
var nxt='';
var scr2='';
var scr3='';
    var imgs=arrs.split(',');
    var i=(flag)-1;
    var k=0;
    var m=0;
    src1='/img/'+imgs[i];
            if(flag != 1)
                prev="<a href=\"javascript:Blowups('"+arrs+"',"+(flag-1)+","+nums+")\" class=\"sdf\">last</a>";
            if(flag != nums)
                nxt="<a href=\"javascript:Blowups('"+arrs+"',"+(flag+1)+","+nums+")\" class=\"sdf\">Next </a>";
document.getElementById('large').innerHTML='<td colspan="2"><img src='+src1+' class="sdf"><div class="sdf"><p class="sdf">'+nxt+'</p><p class="sdf">'+prev+'</p><p class="sdf"></p></div></td>';
div2.className ='sdf';div2.style.height =pheight+'px';
div1.style.marginTop =h+'px';div1.style.height =myHeight+'px';
}
A: 

We had the same issues yesterday. Most of the time it is a on of the ";," symbols that ruines the script.

Try to install the developer toolbar of IE6 and you will be able to do some extra debugging.

And it would be wise to post the code, so we can see where it is going wrong :).

Stegeman
A: 

well the problem with this code was that i was setting tr in innerHTML which doesnt work with IE. i set td instead and it worked fine. Thanks all for you help though!

developer