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

kglad
Community Expert
Community Expert
April 11, 2007
did you test their html form? you should once you can get that to work, you should have no trouble using flash.

i'm a little concerned about that mailto program that has no suffix. normally, that would be mailto.pl or mailto.cgi.

and are you supposed to be using domain.com or your own domain name?
April 11, 2007
Unfortunately it still doesn't work. I've talked to Earthlink all day and they keep saying make the page an external html form so the CGI script will work. It's hard for me to believe that I'm stuck with using a pre-determined external form and not a form created inside a swf file. Is there a simple CGI mailform program that I can upload to my site that will process forms and not have to use Earthlink's 7 year old script. Thanks for the help anyway.
kglad
Community Expert
Community Expert
April 11, 2007
the main thing changed is the address of the mailto script. but yes, i also added the required RECIPIENT variable.

if the html form you displayed is just one example of the forms that can be used by your mailto script, you can probably send any variables you want. otherwise, you'll probably need to limit yourself to the optional variables in the form:

name, email, comments.
April 11, 2007
Thanks, so the only thing you really changed on my code is adding "my_lv.RECIPIENT="me@domain.us"; ? All I need for it to check is First & last name, email & phone. Correct? I'll give it a shot and see if ELink finds the URL. I appreciate your help. I might be back, OK?
kglad
Community Expert
Community Expert
April 11, 2007
use: