Solved

dynamic resizing of activex control in a pop up window

Posted on 2004-10-29
745 Views
Last Modified: 2010-05-19
Hi,

i am trying to get the activex control dynamically resized based on the size of popup window.

popup window contains a activex control , i set it to a default size when loaded.

what i want to achieve is when the user resizes the popup, even the activex shld resize accordingly.
is that possible?
0
Question by:chandua
    8 Comments
     
    LVL 15

    Accepted Solution

    by:
    try this, it might not work but give it a try

    window.onResize = OnResize;

    function OnResize( )
    {
          // Get a reference to the activeX control
          var objControl = document.getElementById( "idActiveX" );

          // Resize it
          objControl.height = event.height;
          objControl.width = event.width;
    }
    0
     
    LVL 15

    Expert Comment

    by:justinbillig
    you could always make it so the user can't resize the window


    http://devguru.com/Technologies/ecmascript/quickref/win_open.html


    window.open( "URL", "TITLE", "resizable=no;" );
    0
     

    Author Comment

    by:chandua
    hi justinbillig,

    i can't set to NO as i need to have this functionality.
     i was trying to implement your first answer,
    window.onResize = OnResize;
    where i wud ablr to set this as i open the popup window using window.open()

    pls reply asap.
    0
     
    LVL 15

    Expert Comment

    by:justinbillig
    put it in the page that you open

    so if your line looks like this

    window.open( "http://www.domain.com/axtivex.html" );


    in axtivex.html put that function
    0
     

    Author Comment

    by:chandua
    i hit the the following err on "undefined"
    event.height;
    0
     
    LVL 15

    Expert Comment

    by:justinbillig
    try window.height / window.width
    0
     

    Author Comment

    by:chandua
    hi i get it as invalid arguement.
     i tried document.Form1.clientHeight
    its the same err
    0
     

    Author Comment

    by:chandua
    Hi justinbilling,

    i used document.body.clientHeight & it worked.

    anyways thanks for getting it going.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    No!  Not that kind of date. :-)  That wasn't meant to be a pick up line. This article is about displaying dates in different formats regardless of the browser being used.  If you let the browser's JavaScript engine format a date object for you, t…
    Article by: DanRollins
    This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    934 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now