Jump to content

preventing new window pop up after e-mail form submission to php


TrAsH

Recommended Posts

Hi Guys,

would really appreciate your help in this area.

I have a form submission page on my flash site which sends the form to a php script for e-mail submission. The php script is working fine and I am receiving the desired e-mail.

However, whenever the user submits the form from my Flash site, another window will pop up. I am trying to stop this windown from poping up as I want the user to stay on my Flash site. (I could specify the pop up windown using [Header ("location: $location");] to specify the pop up URL, i want to totally diable this pop up]

Thanks guys!
???
Hi AndyB,

thanks for the reply. But there's nothing that I can see that is opening up a new window.  ???

my php code (contact_us.php) is as below:
//=================================================================
<?php

$email_subject = "Customer Query";

$body = "Query Details \r";
$body .= "------------------------ \r";
$body .= "Name: $name \r";
$body .= "Contact Number: $contact_number \r";
$body .= "Email: $email \r";
$body .= "Address: $address \r";
$body .= "Customer requirments: $requirements \r";
$body .= "Other comments: $comments \r";

mail("[email protected]", $email_subject, $body, "From: [email protected]");

?>
//=================================================================

if i added the code below:
$location = "http://www.mysite.com";
header ("Location:$location");

it will open another window with my site but if i do not specify the wed address or omit the code completely it will try to open up "http://www.mysite.com/contact_us.php" as a new window.



my actionscript code in my Flash site that calls on my php script:
//=================================================================

gatherForm.send("http://www.mysite.com/contact_us.php", "_blank", "POST");

//=================================================================

Thanks again for looking through this.

Best Regards,
TrAsH  :-\
It's this line that's doing it. The "_blank" secion tells it to open a new window to send the form. I guess you could change that, but it may be needed - I don't know enough about Flash to help you with this. If you need to have that part there, replace the "_blank" with "_self" - though this might mess up your flash...

gatherForm.send("http://www.mysite.com/contact_us.php", "_self", "POST");

Good luck.
Hi ale_jrb / Daniel0,

Thanks for the tips.
Yeps its the ActionScript allright....
by changing _Blank to _self, i prevented the new window from popping up. However, I am not able to get my Flash to continue from where it was at..... but at least i'm halfway to where i wanna get.  ;D

Thanks!

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.