hi all,

i need to write a php program that loads another page thru header("Location: $k") which is activated by pressing on a link. and between clicking the link and the header command, i need to pop up a box which automatically closes after a given number of seconds. this box in effect should delay the main browser window from processing until the popped up window closes. further complication is i cant use an interim page else the user has to click the back button twice before returning to my page. any ideas?

regards

    I think you're in the wrong forum for this. I'm no php-god but I don't think it's possible in php (closing windows and such..)
    Or will someone prove me wrong? 🙂

    I'd use JavaScript if I were you...

      yes i've figured as much, php and javascript.

      as an example, i need something like what happens when you click on the "submit" button after typing in a message on this forum: "Please wait while the browser..."

      the page redirects after a few seconds but if you press the 'back' button on the browser, you would see the interim page (less the text). what i am trying to avoid is this page coming up in between the post button and the target page.

      anybody?

      regards

        I guess if it's a specific amount of time you could do it something like this:

        1. User clicks link and goes to php script while Javascript pops up window.
        2. Original window [man]sleep[/man]s for a certain amount of time as does the pop-up.
        3. After time is up, the location header is sent in the original window and the popup closes itself.

        If it's something that's really doing some processing, maybe:

        1. Execute long php script followed by location header in original window.
        2. New location contains javascript to close the popup window with onLoad().
          Write a Reply...