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 14, 2007
Just in case you're around today, we're back to the error message: "Sorry, this CGI is only available to sites hosted with EarthLink, Inc."
kglad
Community Expert
Community Expert
April 14, 2007
go to

https://cc.earthlink.net/control-center/login.jsp?redirect=%2Fcontrol-center%2Findex.jsp%3Fx%3D-1927715346&x=2058171029

login and search for some security check that earthlink performs for their email form or some faq about using flash and email forms.
April 13, 2007
This is where the test site sits; http://www.davidbrewer.com/DVL/DVL.html
April 13, 2007
This what I get: The requested URL /DVL/cgi-bin/mailto was not found on this server.

I forgot to tell you that the DVL site is in a folder "DVL" in my site. Obviously, this makes a difference in the code. It's there for this testing purpose. Their actual site is up without the form page. Sorry.
kglad
Community Expert
Community Expert
April 14, 2007
your swf being in DVL is significant. let's try:



April 13, 2007
This is what happened: "Sorry, this CGI is only available to sites hosted with EarthLink, Inc."
The html page title "Bad Referer".
The html address was exactly the same as the SampleForm's that worked: http://www.davidbrewer.com/cgi-bin/mailto.
It never got to the THANKURL page.
I'm sending this in the quick reply box. I'll send another with the code I put in.
April 13, 2007
Here's the code I put in:
kglad
Community Expert
Community Expert
April 13, 2007
ok, that's progress. if your el website is www.davidbrewer.com use:

kglad
Community Expert
Community Expert
April 13, 2007
ok, let's see what happens.
April 13, 2007
Great. Thanks. As Arnold would say, "I'll be back!"
kglad
Community Expert
Community Expert
April 13, 2007
you can add lv.address etc. it won't hurt anything and if the mail script is worth $.02 it should handle all the variables you send.

but you should send the variables i listed, at least, while testing.

having a non-existant thank you page shouldn't cause a problem if the mail script was properly written. we'll find out if the script tries to open a non-existant page: if you see a 404 page because you have no ThankYou.html, we'll have to check with el support to fix that.

and you can check for empty textfields or correctly formatted email addresses etc before you create the loadvars object.
April 13, 2007
I don't want to use the THANKURL. The flash form itself goes to a "success" page. Can I eliminate that line and change the lv.comments to lv.phone? What about checking that they have typed something(required) in First and Last Name, email and phone, if they haven't it goes to an "Error" page. I also have address, city, etc fields that they don't have to fill out if they don't want to. Should I also put in lv.address, lv.city, etc
April 13, 2007
The cgi folder on el has nothing in it.
kglad
Community Expert
Community Expert
April 13, 2007
now copy the code for your working html form and paste it to this forum using the attach code option.

also, can you determine if your swf has a subdirectory called cgi-bin that contains your mailto script?
April 13, 2007
Here's the code. There is onyl a cgi folder on EL server. There is also a Contact folder with an Earthlink.dat document in it.
kglad
Community Expert
Community Expert
April 13, 2007
well, let's see if it's using some sort of redirect. otherwise you're going to need a cross-domain policy: