how to change vlc activex control's displayheight and width

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
alice
Blank Cone
Blank Cone
Posts: 13
Joined: 24 Apr 2006 04:01

how to change vlc activex control's displayheight and width

Postby alice » 03 Jul 2006 07:16

i want to change activex display height and width, i use extentheight but it can't change it .how to change it? please help me ,thanks!

mzsolt

Postby mzsolt » 28 Jul 2006 11:14

I'm also creating a web app, where vlc ActiveX plugin is used, and I would like to set the width and height property of ActiveX by javascript but it doesn't work...

alec_robertson

Postby alec_robertson » 28 Jul 2006 15:49

Try the following for internet explorer/activex:

Code: Select all

<table width="720" height="352" align="center" id="vlct"> <tr><td> <object width="100%" height="100%" id="vlc" classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8"></object> </td></tr> </table> <script language="javascript"> dw = document.body.clientWidth*0.8; // width is 80% of browser dh = dw/720*352; // maintain aspect ratio document.getElementById('vlct').style.height = dh; // set height document.getElementById('vlct').style.width = dw; // set width </script>
The activex will fill the table, and by adjusting the table dimensions you adjust the activex.

mzsolt

Postby mzsolt » 02 Aug 2006 09:00

Thanks for the tip. The problem is much more simple than I thought. Just using "vlc.style.width" instead of "vlc.width" resizes the control in IE.

Thanks again for help.

Zsolt


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 29 guests