dynamic resizing of activex control in a pop up window


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?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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;

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
you could always make it so the user can't resize the window


window.open( "URL", "TITLE", "resizable=no;" );
chanduaAuthor Commented:
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.
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

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
chanduaAuthor Commented:
i hit the the following err on "undefined"
try window.height / window.width
chanduaAuthor Commented:
hi i get it as invalid arguement.
 i tried document.Form1.clientHeight
its the same err
chanduaAuthor Commented:
Hi justinbilling,

i used document.body.clientHeight & it worked.

anyways thanks for getting it going.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.