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 13, 2007
Good morning, kglad. The EL sample form is working perfectly. I changed the "domain" to my site address and the email to my email address for testing. Now what ?
kglad
Community Expert
Community Expert
April 13, 2007
no, you would use the html example form from el and see if it works:

<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>
April 12, 2007
OK. I'll get a HTML form working with the same input text boxes and 4 check boxes.
Is this what I should do?
kglad
Community Expert
Community Expert
April 12, 2007
if you can get a html form working, i can show you how to get your flash form working. otherwise, i don't know what's in any of your server's folders and what you need to setup so the email works.

but there are usually some hurdles to prevent spammers from hijacking your form and using it to send spam. so, you have to know what those hurdles are and those should be listed in the el support.
April 12, 2007
I've regrouped. Being an idiot when it comes to action script and what I need to do after I create a working HTML form and then some how transfer that to my Flash file is becoming so complicated that I don't think it's really worth it. There is a Contact folder in EL's web folder that contains a txt document (which the EL script links to) with the email script for each text input box in their sample form. If I change that to match my form in Flash and link to that, do you think it might work? With absolutely no help from Earthlink, and little documentation in Flash support, I'm walking a road to internet mail hell. The only docs I could find on Adobe was for Dreamweaver forms. I just can't fathom that the process to send a Flash form is this complicated and time consuming. I really appreciate your effort and time spent trying to solve MY problem . Being ignorant is not Bliss.
kglad
Community Expert
Community Expert
April 11, 2007
there should be nothing after mailto. remove that colon and the email address that follows the colon.
April 11, 2007
I've activated the CGI script on Earthlink. The Earthlink CGI script is at the top of our conversation. I just can't seem to translate it to my Flash script and/or your revise script (see above). Neither worked. I get the error message:

Not Found
The requested URL /cgi-bin/mailto:info@dvl.us was not found on this server.
(This is with my script) and I get the same message with your script. I'm getting brain dead!
Here is the link to the site i'm working on. Go to the contact page(bottom button) and see what error message YOU get. They seem to change a little with each script change. http://www.dvl.us. Hope you'll be here tomorrow. Thanks again for all your help.

kglad
Community Expert
Community Expert
April 11, 2007
i'm not sure how you do that because i've never used earthlink's control center. normally files are uploaded to the server and the software that does the uploading (an ftp program) allows you to edit the file permissions.

but before you worry about permissions, you need to add the file to your cgi directory:

Does EarthLink offer any ready-to-run CGI or PHP scripts?
Yes. On our UNIX hosting platform, we provide you with several ready-to-run CGI and PHP scripts that you can add yourself through your Control Center. Some of those include a hit counter, forum, e-mail form, blog and guestbook for your site.
April 11, 2007
I'm using the real domain name in the script and in the email. I wasn't aware that I had to do the mail script through the control center. After talking with them for 2 days, this is the first time I've heard that. Explain "set permissions" if you would, please. I really appreciate all your time and help.
kglad
Community Expert
Community Expert
April 11, 2007
i just checked earthlink's customer support and it looks like you're supposed to ad the mail script through your control center. did you? did you set permissions on the script?