This is a discussion on closing pop-up window within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I have created a mail form in a pop-up window. After the mail has been send succesfull i would ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have created a mail form in a pop-up window. After the mail has been send succesfull i would like the window to close (without having to click on a link or button (wich activaties the 'window.close' command) Is this possible and how. I can not seem to find anything like this. roy The Nethelands |
|
|||
|
On Wed, 25 Feb 2004 16:04:21 +0100, "Roy G. Vervoort"
<roy.vervoort@rojaal.nl> wrote: > > >I have created a mail form in a pop-up window. After the mail has been send >succesfull i would like the window to close (without having to click on a >link or button (wich activaties the 'window.close' command) > >Is this possible and how. I can not seem to find anything like this. > >roy > >The Nethelands > You could do a redirect to a page which closes onLoad. <? ### Your mail code... header ("location: close.html"); ?> <!-- close.html--> <html> <head></head> <body onLoad="self.close()"> </body> </html> |
|
|||
|
Just call it after mail()
i used to do this way, <?php mail(...); ?> <script> self.close(); </script> Savut "Tyrone Slothrop" <ts@paranoids.com> wrote in message news:k7gp30ps8366k6b76sqe40nph81gp3noq5@4ax.com... > On Wed, 25 Feb 2004 16:04:21 +0100, "Roy G. Vervoort" > <roy.vervoort@rojaal.nl> wrote: > > > > > > >I have created a mail form in a pop-up window. After the mail has been send > >succesfull i would like the window to close (without having to click on a > >link or button (wich activaties the 'window.close' command) > > > >Is this possible and how. I can not seem to find anything like this. > > > >roy > > > >The Nethelands > > > > You could do a redirect to a page which closes onLoad. > <? > ### Your mail code... > header ("location: close.html"); > ?> > > <!-- close.html--> > <html> > <head></head> > <body onLoad="self.close()"> > </body> > </html> |