Re: Launching a Browser Win with PHP - Is it possible?
| From: | Owen Prime | Date: | Mon, 14 Oct 2002 07:51:07 +0000 |
| Subject: | Re: Launching a Browser Win with PHP - Is it possible? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119849@lists.php.net to get a copy of this message | ||
Sorry, that should be window.opener.location.reload() instead of refresh().
Owen Prime wrote:
> You will have to use mainly Javascript for this. What I have done in the
> past is:
>
> STEP 1.
> In the <form> tag put a onSubmit argument which does a window.open(). This
> should pop up a small window which you can use writeln() to add content to
> it. Like your 'Uploading...' message or an image.
>
> STEP 2.
> Also in the onSubmit argument, set this.target = the new window name. This
> will make the form post to the popup window.
>
> STEP 3
> When the file is finished uploading, I get the PHP to output the
> javascript: window.opener.refresh(); // Refreshes the main window
> window.opener.focus(); // Brings the main window to the top
> window.close(); // Closes the popup window.
>
> This should sort you out.
>
> Cheers,
>
> Owen Prime
> http://www.noggin.com.au
>
> Monty wrote:
>
>> For a form that allows people to upload image files to the server, I'd
>> like to pop open a small browser window with an "Uploading..." message
>> once someone clicks on Submit button. Then I'd like the window to
>> automatically close once the process is done and the main browser window
>> refreshes.
>>
>> Can this be done with PHP or should I be using Javascript? If there are
>> any examples of how to do this online, I'd appreciate the URL.
>>
>> Thanks!
--
Cheers,
Owen Prime
http://www.noggin.com.au