Jump to content

Open a modal window with php redirect


Toony

Recommended Posts

Hello,

Basically I'm working/editing a file upload script, at the moment the client uploads a file via a form, if successful the client is redirected (via redirect ("domain.com")) to a success page.

What I want to happen is rather then opening a new page for the success page I would like to have it open up in a [url=http://www.subimage.com/dhtml/subModal]modal window[/url] or this [url=http://jquery.com/demo/thickbox/]version[/url].

Both of which use JS, I would like to know how I would go about adding this to the redirect or header function.

Btw I am a newbie to PHP.

Many thanks


Link to comment
https://forums.phpfreaks.com/topic/34255-open-a-modal-window-with-php-redirect/
Share on other sites

[code]
<script type="text/javascript">
window.open('http://ururl.com','mywindow','width=570,height=200');</script>
[/code]
This is the javascript for popups. but I dont understand why do you want a php redirect, maybe you can explain.
Ted
Thanks Ted,

On submit of the form the file attached is checked for size and mime type, if all is Ok then the user is redirected to a sucsess.php page. In the index.php file the final line of the php code is

[code]redirect ("success.php")[/code]

What I want to do is open the success page as a model window using the JS scripts linked in the 1st post, so I want to know if it’s possible to apply JS in the php code, to the redirect.

If JS is turned of I would like it to redirect to the success page as normal.

Apologises if I have not explained myself well.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.