开发者

Setting width to iframe based on browser using jquery not worked in IE

开发者 https://www.devze.com 2023-03-23 04:47 出处:网络
I am using the following code for setting height and width to a div and iframe based on browser window height and width

I am using the following code for setting height and width to a div and iframe based on browser window height and width

    var newheight = $(document).height();
    var newH = parseInt(newheight) - 170;
    var newHI = parseInt(newheight) - 215;
    var width = $(document).width();
    var neww开发者_StackOverflowidth = $('#LeftPane').width();
    var newW = parseInt(width) - (parseInt(newwidth) + 50);
    $('#LeftPane').height(newH);
    $("#ifrforms").height(newHI);
    $("#ifrforms").width(newW);

But this code is not working in IE? It troubles me... if any body knows the solution please help me...


Try this

var newheight = $(document.body).height();
    var newH = parseInt(newheight) - 170;
    var newHI = parseInt(newheight) - 215;
    var width = $(document.body).width();
    var newwidth = $('#LeftPane').height(newH).width();
    var newW = parseInt(width) - (parseInt(newwidth) + 50);
    $("#ifrforms").height(newHI).width(newW);
0

精彩评论

暂无评论...
验证码 换一张
取 消