Toony Posted January 15, 2007 Share Posted January 15, 2007 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 More sharing options...
Toony Posted January 15, 2007 Author Share Posted January 15, 2007 I might have found the answer, would this do the trick http://www.phpfreaks.com/forums/index.php/topic,114696.0.html if I replaced the JS with other the scripts?Thanks Link to comment https://forums.phpfreaks.com/topic/34255-open-a-modal-window-with-php-redirect/#findComment-161111 Share on other sites More sharing options...
ted_chou12 Posted January 15, 2007 Share Posted January 15, 2007 [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 Link to comment https://forums.phpfreaks.com/topic/34255-open-a-modal-window-with-php-redirect/#findComment-161113 Share on other sites More sharing options...
Toony Posted January 15, 2007 Author Share Posted January 15, 2007 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. Link to comment https://forums.phpfreaks.com/topic/34255-open-a-modal-window-with-php-redirect/#findComment-161125 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.