Simple JavaScript Window.Close() event not firing...

Posted on 2009-12-30
Last Modified: 2012-05-08
Attached is the file. Is it because of the <noscript> section preceding desired button effect? I know I'm missing something simple.
Question by:groundswell
    LVL 75

    Expert Comment

    by:Michel Plungjan
    You are no longer allowed to close a window from a page that did not itself open that window using script.
    And we are quite happy you cannot since that meant you could close our main browser with all the history and such

    So the answer is: You cannot close a window using window.close() unless open by the same domain using a script

    Author Comment

    So, I'm uploading content (this HTML file is the wrapper for that content) to an LMS in a zipped package of multiple files. When a user closes this wrapper, it's unLoad event is sending data to the LMS registering different variables with the system.

    You're telling me that because of how this is launched from the LMS I can't put a button on the page to close the window, instead I have to have the users close the spawned window using the window's own close feature (in the case of Windows, the little X in the top right corner)?

    Author Comment

    As an additional note, when a user connects on a link on the LMS, it opens a browser window (this wrapper file that I've attached), and I'm trying to give the users an obvious tool to close the child window and return to the LMS.
    LVL 75

    Accepted Solution

    You as SOL. Sorry

    Author Comment

    No kidding...


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
    Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now