Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Closing a window Javascript

  • 30-11-2006 12:22pm
    #1
    Registered Users, Registered Users 2 Posts: 7,983 ✭✭✭


    Hi,

    I have an asp page where i am trying to close the window without the user been prompted to close it.

    I have the following code
    <script type="text/javascript">
     window.close();
    </script>
    

    but everytime it runs they get a window pop up prompting them to close it.

    Can I get around this problem.

    The browser I am using is IE6

    Thanks for your help


Comments

  • Closed Accounts Posts: 522 ✭✭✭comer_97


    as far as i know you can only close a window without that message if you used javascript to open it.


  • Registered Users, Registered Users 2 Posts: 7,983 ✭✭✭Trampas


    Thanks.

    I am opening it from a VBA application


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Yep, afaik too, only a parent may close a child window (or a child window may close itself).


  • Registered Users, Registered Users 2 Posts: 4,475 ✭✭✭corblimey


    You could fake the window.opener value to suppress this message:
    <a href="javascript: window.opener='thiswin'; window.close();>Close</a>
    


Advertisement