• 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
Guest
Apr 22, 2007 Apr 22, 2007

Copy link to clipboard

Copied

I'm sending this again, I don't think the first one went through. I guess I spoke too soon about getting it! I've attached my code. Do I have the "cbListener" backwards with the instance name? The only thing that shows up on the form is "cb:Yes" once. And it doesn't matter if the boxes are checked or not, just one "cb:Yes". Should I have attached a "onClick" funtion to each box?

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 22, 2007 Apr 22, 2007

Copy link to clipboard

Copied

do each of your checkboxes have a label that's the same as their instance name or, at least, different from one another?

do you have any other code affecting your checkboxes like an onClick method (which you should not have).

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 22, 2007 Apr 22, 2007

Copy link to clipboard

Copied

They all have different names. Extended versions of the instance name. There is nothing attached to the checkboxes.

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 22, 2007 Apr 22, 2007

Copy link to clipboard

Copied

are there any spaces or other characters in their names that would cause a problem when used as a property?

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 22, 2007 Apr 22, 2007

Copy link to clipboard

Copied

Yes there are. I'll fix and let you know.

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 22, 2007 Apr 22, 2007

Copy link to clipboard

Copied

Still the same. Only thing that shows up related to the cbs is one "cb:Yes".

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 22, 2007 Apr 22, 2007

Copy link to clipboard

Copied

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.

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

Forgot. If you fill it out and check the boxes, a page comes up showing you what you've sent.

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

i need a link to your fla

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

my bad. your listener should be:

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

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!

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

Or, Clint!

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

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.

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

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.

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 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

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

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 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

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?

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 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

Yes, yes and yes.

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 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

Is this error message related to the cgi script or the flash script or both?

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 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

there were four questions (though only 3 question marks).

i'll assume the answer is yes, to all four but check that FormMail.pl is exactly that with two uppercase letters (F and M) and the remainder lower case.

what's the exact error message?

did you change anything in FormMail.pl when you were dabbling?

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 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

Yes to all counts. Two upper F and M + lc .pl

error message:500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the site administrator and inform them of the time the error occured and anything you might have done that may have caused the error.

The only thing I changed was the debug to =0 after it was working (as they recommended) but changed it back to =1 after I got the error message. I'm just concerned that I deleted/missed a comma, period or some strange code character somewhere.

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 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

didn't you have to change

From: you@your.com

to

db@davidbrewer.com ?

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 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

I didn't the first time. The cgi replaced that with the email address that the sender typed in. The cgi script looks for an @ to make sure it's a valid email address. Do you think I should change it and give it a try?

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 24, 2007 Apr 24, 2007

Copy link to clipboard

Copied

change the date format back to the original just to check if you introduced a problem there.

and don't change the From: part of 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