Skip to main content
April 11, 2007
Question

Earthlink CGI script and Flash

  • April 11, 2007
  • 95 replies
  • 24236 views
I've created a contact form in Flash and the script can't find the URL at Earthlink. I've talked to EL and they said use the EL CGI html code and incorporate in the Flash script. I tried a multitude of ways and get constant syntax errors. My code has no errors but can't find the URL. I've attached my code and Earthlink's sample code. Can someone show me where to put what?
Thanks for any and all help.

Earthlink's code:
<h1>Sample Form</h1>
<hr>
<form method="post" action=" http://www.domain.com/cgi-bin/mailto"> 
<input type="hidden" name="RECIPIENT" value="user@domain.com"> 
<input type="hidden" name="THANKURL" value=" http://www.domain.com/thankyou.html"> 
<p> 
<b>Name:</b><input type="text" name="name" size="30"><br> 
<b>Email:</b><input type="text" name="email" size="30"><p> 
<b>Comments:</b><br> 
<textarea name="comments" rows="10" cols="50"></textarea>
<p> 
<input type="submit" value="Send"> 
<input type="reset" value="Clear"> 
</form> 
<p>


My Flash Code:
stop();

send_btn.onRelease = function() {
var my_lv:LoadVars = new LoadVars();

my_lv.firstName = firstName_txt.text;
my_lv.lastName = lastName_txt.text;
my_lv.email = email_txt.text;
my_lv.phone = phone_txt.text;

if (firstName_txt.text != "" && lastName_txt.text != "" && email_txt.text != "" && comments_txt.text != "")
{
my_lv.send(" http://www.domain.us/cgi-bin/mailto:me@domain.us","_blank","POST");
gotoAndStop("success");
}
else
{
gotoAndStop("error");
}
}
This topic has been closed for replies.

95 replies

April 25, 2007
I thought we had 20-30 to go. If I had known we were that close, I'd have made up something!

Good news, you must have read my mind. I started from scratch this AM with the cgi script and Wham-Bam!!! Up and running. Don't feel as though you're through just yet.

I have to change the email info and transfer this over to the clients site, arrrrgh!

And, when the sender sends an email, a pop-up confirmation page shows what that person sent. The client doesn't want that. So, I sent an email to the FormMail people and asked them the settings to turn it off. Got an email back saying that by default there is not any pop-up page. They want me to send them the link to the page and my cgi settings.

So, for all intents and purposes, we might reach the 200 mark!

kglad
Community Expert
Community Expert
April 25, 2007
to prevent the pop-up page, use the sendAndLoad(), instead of send, method of the loadvars class:

kglad
Community Expert
Community Expert
April 24, 2007
and we hit 100. you got the honor!

if all else fails, you can restart with the FormMail script from matt's website. it could be that you hit a key while the cursor was somewhere other than the start of FormMail.pl.
April 24, 2007
OK, I'll do it in the (my) AM.
kglad
Community Expert
Community Expert
April 24, 2007
change the date format back to the original just to check if you introduced a problem there.

and don't change the From: part of the script.
April 24, 2007
I didn't the first time. The cgi replaced that with the email address that the sender typed in. The cgi script looks for an @ to make sure it's a valid email address. Do you think I should change it and give it a try?
kglad
Community Expert
Community Expert
April 24, 2007
didn't you have to change

From: you@your.com

to

db@davidbrewer.com ?
April 24, 2007
Yes to all counts. Two upper F and M + lc .pl

error message:500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the site administrator and inform them of the time the error occured and anything you might have done that may have caused the error.

The only thing I changed was the debug to =0 after it was working (as they recommended) but changed it back to =1 after I got the error message. I'm just concerned that I deleted/missed a comma, period or some strange code character somewhere.
kglad
Community Expert
Community Expert
April 24, 2007
there were four questions (though only 3 question marks).

i'll assume the answer is yes, to all four but check that FormMail.pl is exactly that with two uppercase letters (F and M) and the remainder lower case.

what's the exact error message?

did you change anything in FormMail.pl when you were dabbling?
April 24, 2007
Is this error message related to the cgi script or the flash script or both?
April 24, 2007
Yes, yes and yes.