URL Forwarding

DarkLight's picture

He has: 287 posts

Joined: Oct 2007

Hi, I have a html/php document, with a text link that opens a new window/popup.
The new popup windows contains a form. What i want is when the user submits the form, when the form completes it's task, it closes the popup, then call a url from the main page.
Is this even possible?
Thanks in Advance.

All the best news here: https://newsbotnet.com

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Ya, it's possible. Here is an example.

Just open the popup however you want to do it, and on the send page of the popup, have this code in the head:

<script language="javascript">
function UpdateClose()
{
opener.window.location = "some_page";
self.close();
}
</script>

...and this in the body:

<script language="javascript">
UpdateClose();
</script>

DarkLight's picture

He has: 287 posts

Joined: Oct 2007

AHH THANK YOU.
Thanks for this. I have had to settle for the user closing the window manually after it has displayed a thanks page.
Thank you for this, it save me from being overloaded by junk mail.
If the user is dropped off in the contact form, then they continually send.
If it directs them away, then they forget quickly. lol.
cheers.

All the best news here: https://newsbotnet.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.