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 9 of 9
  1. #1
    New Coder
    Join Date
    Jan 2004
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    closing a popup window from a different page then where it was created

    i hope this explains what i am trying to do a little better.

    i have a page that a person loggs on to and once they log on it takes all their images and compresses them. all that works fine but the thing that i am wanting done is that once they log in it takes an amount of time for the compressor to do its thing if there are a lot of images. so i want a window to pop up on the page that they log into and once the page that actually does all the compression is finshed doing its thing i want it to close the "please wait" window.

    there is a total of 3 pages
    default.asp - the page that opens the pop up window
    loading.asp - the popup window that says please wait
    main.asp - the page i want to close the pop window with

    i hope this is a bit simpler

  • #2
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    (Please add the folowing script to the default.asp)
    __________
    <script language="JavaScript" type="text/javascript">
    <!--
    var popup
    popup = window.open('loading.asp' , 'newwin' , 'toolbar=0 status=0')
    function closewin(){
    popup.close()
    }
    //-->
    </script>
    <body onload="return closewin()">

  • #3
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There will be no need for your main.asp page

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Please don't double-post the same question. I've deleted this thread's duplicate.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    New Coder
    Join Date
    Jan 2004
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok i wasn't clear enough

    on formsubmit it pops open the window. main page takes a while to load cause it is prossing images. i want the window to close once this page completely loads

    my problem is that there are 2 different pages

  • #6
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello, I found out that i may need to modify my script further. Please come back about an hour later or wait 4 some1 else.

  • #7
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb

    I think that the loading.asp should be opened in the main.asp(head), then closed with the <body onLoad> event handler. This way, upon entering, a popup page(loading.asp), will pop up. Then, when the page loads, the <body onLoad> event handler will close the window. Attached is an example.
    Attached Files Attached Files

  • #8
    New Coder
    Join Date
    Jan 2004
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    this would work fine if there wasn't asp on the page that actually process and which causes the page to take so much time in loading. this is where the whole problem kicks in. i will however try and i will let you know how it goes
    and did you actually go and take a look at the site it sent you

  • #9
    New Coder
    Join Date
    Jan 2004
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well the problem is still presisting so what i am going to do is implement your code and i am going to make the form only able to be subbmitted once. if you do however find anything out i will much appreciate it


  •  

    Posting Permissions

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