• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Earthlink CGI script and Flash

Guest
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

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");
}
}
TOPICS
ActionScript

Views

23.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
replies 113 Replies 113
Community Expert ,
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

use:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2007 Apr 11, 2007

Copy link to clipboard

Copied

there should be nothing after mailto. remove that colon and the email address that follows the colon.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 12, 2007 Apr 12, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2007 Apr 12, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 12, 2007 Apr 12, 2007

Copy link to clipboard

Copied

OK. I'll get a HTML form working with the same input text boxes and 4 check boxes.
Is this what I should do?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2007 Apr 12, 2007

Copy link to clipboard

Copied

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

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 ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

well, let's see if it's using some sort of redirect. otherwise you're going to need a cross-domain policy:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

The cgi folder on el has nothing in it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

Great. Thanks. As Arnold would say, "I'll be back!"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

ok, let's see what happens.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 13, 2007 Apr 13, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines