Results 1 to 2 of 2

Thread: How to capture on restore down event

  1. #1
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to capture on restore down event

    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:
    <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.

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Sorry, but trying to access things outside of a browser's capabilities, as of in this case, trying to access the window, would be impossible.
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •