Old 05-31-2007   #1 (permalink)
Registered User
 
Join Date: May 2007
Posts: 4

javascript to capture event for restore down or maximize

Hi:

I am using IE 6 SP2.
I needed to resize an iFrame when the window is resize. And the only way I know how is to called a javascript function when the resize event occur.
I can capture the event when the window is resize on a simple html but when I used with an actual application, the resize event doesnot get trigger when I changed the size of the window. I believed the reason is because if the url the IFrame references also has a resize event in its body it interferes with the resize event outside of the iframe.

Here is my javascript code:
Quote:
<html>
<head>

<script type="text/javascript">

window.onresize = test2;
function shrinkIFrame()
{
alert("load event!");
}

function test2()
{
alert("test1,window.onresize");
}

function test1()
{
alert("test1,onresize");
}
</script>
</head>
<body onLoad="shrinkIFrame();" onresize="test1();">
<p>Resize the browser window to fire the resize event.</p>
<iframe src="http://www.google.ca" name="dataFrame" id="dataFrame" style="height:942.0px; width:100%" scrolling="NO" frameborder="0"></iframe>
</body>
</html>

The alternative for me is to capture the event when the user click on the "restore down" or when the user click on "maximize" button in the popup.
Does anybody know the javascript to do such thing.

Any hint would be greatly appreciated.

Yours,

Frustrated.
jadeite100 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 01:32 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT