SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2002
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I prevent confirm box opening

    I have a small script which opens a popup and then closes so that only the popup remains. I want to do this as I wish to call a new window from a Flash movie but don't want the window to have address bars etc. This I can fix in the popup. The code below works fine but produces a Do you want to close the window confirm box in IE6. Is there any way I can prevent this confirm box from appearing?

    <script type="text/javascript">
    window.open("test.htm","","top=40,left=40,width=550,height=100");
    window.self.close();
    </script>

    I haver tried to use the fscommand in flash to call the javascript directly - this works in IE6 but not Netscape 6.2 hence the attempt to create a self closing window that generates a popup.

    Alternatively is there any way to get rid of the address bars etc when calling a URL with a _blank target

    Any help appreciated
    dbg

  2. #2
    SitePoint Enthusiast RogueJedi's Avatar
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You are attempting to close the parent window. I do not think there is any way to do this without alerting the user.
    Rob Nolan
    Do or do not, there is no try.

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's a hack for this, but only stops the confirm in a few browsers and OSes, so it's more of a trick than a solution.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  4. #4
    SitePoint Member
    Join Date
    Feb 2003
    Location
    UK
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep - there's a thread on this here


Bookmarks

Posting Permissions

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