Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    getting wmp object playState from iframe

    I have a wmp object in an iframe and I would like to get the playState from a function in the main page. What I want to do is something like this:

    function getPlayState(); {
    parent.iframe1.getElementById. Player.playState
    if playState==0
    void(0);
    else {
    parent.iframe1.showDiv23();
    parent.iframe1.hideDiv();
    }}

    Of course this doesn't work because I don't really know what I'm doing. But I think it shows what I want it to do. It only has to work in IE because it's for an app I'm making in an IE based app specific browser.

    I don't even know if this is possible; but if it is, could someone help me turn it into a working function.

    Thanks in advance.

  • #2
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I figured it out. In case anyone has the same question, this is how I made it work:

    Code:
    function getPlayState(){ 
    var MediaPlayer=parent.iframe1.document.getElementById("Player");
    if (MediaPlayer.playState==0  || MediaPlayer.playState==1) {void(0)}
    else {
    parent.iframe1.hideDiv();
    parent.iframe2.showDiv4();
    }}


  •  

    Posting Permissions

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