Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorclewis13
    • CommentTimeAug 12th 2008
     
    This is a popup window spawned from Total LMS 7.2

    Since it appears that the course is playing within an iFrame, what is the best practice for closing this window. I have read some info that it is not possible, but before taking a stab at different solutions, I was curious if any have had luck with this.
    • CommentAuthorphilip
    • CommentTimeAug 12th 2008
     
    that's interesting... SumTotal loads courses in an iframe? i didn't know that. that kinda sucks.

    to close a popup window using a script executed in an iframe, target 'top' instead of 'window' or 'self'.


    function closepopup(){
    top.close();
    return false;
    }


    i use it in an HTML link like so:


    <p><a href="#" onclick="return closepopup();">
    Click here to close the popup window</a>.</p>


    i've tested it successfully in safari 3, firefox 3, and opera 9.5 (all mac). pretty sure it works in windows though i haven't had time to test it.

    try it yourself here:
    http://pipwerks.com/lab/javascript/popups/closing-from-iframe/

    - philip
    • CommentAuthorclewis13
    • CommentTimeAug 13th 2008
     
    Attached is the html from the pop up window spawned from Total LMS

    I will try your sample to see if it works.
    • CommentAuthorphilip
    • CommentTimeAug 13th 2008
     
    man, that is some ugly code they've got. :tongue:

    it appears they use a frameset, not an iframe; i figured they'd be using a frameset, since it's a pretty common tool in elearning.

    i'm curious if they continue to use the frameset when the 'course player' is disabled. i'm actually testing some courses in SumTotal 7.6 this week, so I'll have to check it out. :smile:

    thanks for the zip
    • CommentAuthorclewis13
    • CommentTimeAug 15th 2008
     
    Thanks Philip. I have tried several methods, none of which appear to close the popup window. I wish I had direct access to set up the courses instead of relying on the customer each time I want to test something.

    BTW, Love the API. I used eScorte a few years back and your method is easy to implement.
    • CommentAuthorphilip
    • CommentTimeSep 5th 2008
     
    as mentioned in another post, window.top.close() works for me in SumTotal 7.6.