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 24, 2007
are the permissions still set correctly for FormMail.pl? (is the name still FormMail.pl - and case matters.). is FormMail.pl still in the cgi directory?

is #!/usr/local/perl588/bin/perl -wT still the path you use to the perl interpreter?
April 23, 2007
Actually, there was only one contributor, you. I don't know if I should be proud of being a record holder of dunce! I'll bet this thread solved a lot of problems for a lot of people. Everyone else was probable too embarrassed for me to join in. I'm sure we'll break the record sometime in the near future.
April 24, 2007
I knew this was too good to be true. We might make 100 yet.

Everything worked fine for 2 days. I changed the email instance name and matched it in the form code. Then decided to go back to the original. I've gone over the code and can't find any problems. Everything is back where it was in the first place. I checked the cgi script and it's exactly the way it was when it worked. Now I get a 500 internal error message. I'm going to attach the flash code and add the cgi settings below. Would you check them both out and check if I missed something, please.

BEGIN
{
$DEBUGGING = 1;
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 1;
$mailprog = '/usr/lib/sendmail -oi -t';
$postmaster = 'db@davidbrewer.com';
@referers = qw();
@allow_mail_to = qw(db@davidbrewer.com);
@recipients = ('^db\@davidbrewer\.com');
%recipient_alias = ();
@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
$locale = '';
$charset = 'iso-8859-1';
$date_fmt = '%A, %B %d, %Y at %I:%p:%M:%S';
$style = 0;
$no_content = 0;
$double_spacing = 1;
$wrap_text = 0;
$wrap_style = 1;
$address_style = 0;
$send_confirmation_mail = 0;
$confirmation_text = <<'END_OF_CONFIRMATION';
From: you@your.com
Subject: form submission

Thank you for your form submission.

END_OF_CONFIRMATION

# You may need to uncomment the line below and adjust the path.
# use lib './lib';

# USER CUSTOMISATION SECTION
kglad
Community Expert
Community Expert
April 23, 2007
i'm hoping something else needs solving because it's a shame to stop before we hit 100 posts in this thread. i believe this is a record for only 2 contributors.
April 23, 2007
Or, Clint!
April 23, 2007
You truly are a genius! How on earth do you know all this? Just a question, doesn't it seem as though there's a major Flash user friendly coding problem here? Something as simple as my form, with a few lines of text and 4 checkboxes, taking a week of your time to straighten out my lack of expertise. I've done html forms in Dreamweaver and they were a snap. Radio buttons, checkboxes, dropdown menus etc., etc. Just wondering. Anyway, you've made my day, Rocky or Arnold, take your pick!
April 23, 2007
kglad
Community Expert
Community Expert
April 23, 2007
my bad. your listener should be:

kglad
Community Expert
Community Expert
April 23, 2007
i need a link to your fla
April 23, 2007
Forgot. If you fill it out and check the boxes, a page comes up showing you what you've sent.
April 23, 2007
kglad
Community Expert
Community Expert
April 22, 2007
copy the frame that contains your code and stage elements. paste it into the main timeline of a new fla and post a link to that fla.