codewala

code it

Restrict resizing of HTML popup window after a certain limit in IE

1. The resizing works only for the popup window.

2. Javascript timer is set which calls a function to after every few seconds to check what is the current size of the html window – if the html window size is less than the required minimum limit – then resize the html popup window using the javascript method resizeTo(width, height)

launch.html
—————————–

Pop-up Window

resize_window.html
————————————-

var t;
var timer_is_on=0;

function timedCount()
{
t=setTimeout("timedCount()",100);
var w = document.body.clientWidth
var h = document.body.clientHeight
if(w < 500)
{
window.resizeTo(550,550);
}
}

function doTimer()
{
if (!timer_is_on)
{
timer_is_on=1;
timedCount();
}
}

Advertisements

May 14, 2011 - Posted by | HTML, JavaScript

No comments yet.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: