Jump to content


Photo

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


  • Please log in to reply
5 replies to this topic

#1 TrAsH

TrAsH
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 18 September 2006 - 04:16 AM

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!
???

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 18 September 2006 - 05:40 AM

Unless I misunderstood, something in your code opens a new window for some unspecified purpose and you want to disable it. So, find the part of your code that opens the new window and modify it.
Legend has it that reading the manual never killed anyone.
My site

#3 TrAsH

TrAsH
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 18 September 2006 - 06:18 AM

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("my@email.com", $email_subject, $body, "From: system@email.com");

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

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.co...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.co...contact_us.php", "_blank", "POST");

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

Thanks again for looking through this.

Best Regards,
TrAsH  :-\

#4 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 18 September 2006 - 06:30 AM

It's probably the actionscript doing it, but I can't help you with that since I don't know actionscript.

#5 ale_jrb

ale_jrb
  • Members
  • PipPip
  • Member
  • 17 posts
  • LocationLondon, UK

Posted 18 September 2006 - 07:09 AM

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.co...contact_us.php", "_self", "POST");

Good luck.

#6 TrAsH

TrAsH
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 18 September 2006 - 01:59 PM

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!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users