Avoid iframe scrolling issue Using Jquery

15 Nov

In my asp.net web application am using iframe. But i faced some scrolling issues. ie, some of my pages are large in size, then there will be scroll bars for browsers and iframe. Am stuck in this issues for long time. At last i find out a solution using jquery. I fix browser’s scrolling off and set height and width of iframe related to browsers height and width, and then set scroll bars for iframe. Here I am success with the following jquery,

var newheight = $(document.body).height();

var newH = parseInt(newheight) – 90;

var newHI = parseInt(newheight) – 130;

var width = $(document.body).width();

var newwidth = $(‘#LeftPane‘).height(newH).width();

var newW = parseInt(width) – (parseInt(newwidth) + 30);


Here LeftPane is div in my page where all menus resides. I just wants to set scroll bar for that too based on browser’s height and width.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: