Jump to content

Recommended Posts

Posted (edited)

Hi

 

It's supposed to be simple yet it's not working..

I need to get the Width of the Movie Player control in Youtube.

Any youtube standard page that you see a video in it..

 

I tried:

Local $PlayerControl    =$oIE.document.getElementById("movie_player")
MsgBox(0,"",$PlayerControl.width)

And for some reason, it doesn't work.

What should I fix to make it work?

 

Thank you

Zohar

Edited by Zohar
Posted (edited)

I now succeeded getting it, with this:

MsgBox(0,"",$PlayerControl.getBoundingClientRect().top &","& $PlayerControl.getBoundingClientRect().left &@CRLF& _
                     $PlayerControl.getBoundingClientRect().bottom &","& $PlayerControl.getBoundingClientRect().right)

Anyone knows why some Web Elements work good with .width and .height, and some need .getBoundingClientRect()?

Edited by Zohar

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...