Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash forms 1

Status
Not open for further replies.

Urbandood

Programmer
Apr 5, 2002
23
GB
Hi all,

Im working on my homepage and am trying to have a flash form for people to contact me with, here's the problem...

When the user clicks on the submit button it takes them to a html page with just FORM RESPONSE on it which I don't want.

Here's my homepage url you can see what I mean...


And here's the .fla for the contact page...


I have it so when the user clicks submit, it takes them to a frame thanking them so there is no need for the other html page but I can't seem to get rid of it. Can anyone help me with this it's doing my head in.

 
That is the cgi script where it sends the information too!

I've tried loadVariables and loadVariablesNum but nothing happens , thats why i have getURL.

Athlon 1800XP
Epox 8k5a2+
512mb DDR 2700
Gainward GF4 Ti4200 [284/572]
80gb WD
512k DSL
 
try this for the submit button

Code:
on (release) {
	if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
		EmailStatus = "Please enter a valid E-mail address";
		gotoAndStop("Error");
	} else {
		lv = new LoadVars();
		lv.Recipient = "urban_doood@hotmail.com";
		lv.Subject = "Homepage Feedback";
		lv.from = from;
		lv.email = email;
		lv.comments = comments;
		lv.sendAndLoad("[URL unfurl="true"]http://homepages.zen.co.uk/cgi-bin/mailback",[/URL] lv, "POST");
		gotoAndStop("Output");
		Newpage = "";
	}
}
 
Can someone test it for me because it worked lovely on my machine, but when I uploaded it and tried there was no response!

Athlon 1800XP
Epox 8k5a2+
512mb DDR 2700
Gainward GF4 Ti4200 [284/572]
80gb WD
512k DSL
 
I just tried it. Hit Submit; No response.

(Might want to change the tab numbering. When I tabbed from the E-mail field it passed control to the Downloads button instead of the comments field)

-----
The death of dogma is the birth of reason.
 
How come it's working fine on my machine but not on the net then?


Athlon 1800XP
Epox 8k5a2+
512mb DDR 2700
Gainward GF4 Ti4200 [284/572]
80gb WD
512k DSL
 
Wish I could help. I'm a total newbie in Flash.

Just giving you feedback.

Really cool looking form, though.

Cheers.

-----
The death of dogma is the birth of reason.
 
The e-mail validation part is working, though.

Just nothing happens for the final Submit.

-----
The death of dogma is the birth of reason.
 
No point in it looking nice if the bleeding thing doesn't work though 8-(

Athlon 1800XP
Epox 8k5a2+
512mb DDR 2700
Gainward GF4 Ti4200 [284/572]
80gb WD
512k DSL
 
ok i tried to send one from your site


let me get it straight....if you run it from your machine the mail is sent

place the files on your server and nothing comes through


is that whats happening
 
Thats right mate, before I used the script you gave me it worked on the server but I got the html page popping up.

Your script fixed that but now i get no response unless I send something from my machine, it doesn't work from the server!

Athlon 1800XP
Epox 8k5a2+
512mb DDR 2700
Gainward GF4 Ti4200 [284/572]
80gb WD
512k DSL
 
very strange..i use that code myself except to a php page not mailform......however

i know you said you have tried loadVariables but give it another go like this


Code:
on (release) {
	if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
EmailStatus = "Please enter a valid E-mail address";
gotoAndStop("Error");
	} else {		
loadVariables("[URL unfurl="true"]http://homepages.zen.co.uk/cgi-bin/mailback",[/URL] this, "POST");
		gotoAndStop("Output");
		Newpage = "";
	}
}
 
Hehehe now it wont work at all!

I've tried it on my machine..nothing and from the server..nothing.

Sorry to be a pain!

Athlon 1800XP
Epox 8k5a2+
512mb DDR 2700
Gainward GF4 Ti4200 [284/572]
80gb WD
512k DSL
 
just a process of elimation

using loadvars had to be better

where i am stumpted is with why it works locally on your machine and not on the net with loadvars...it shouldnt

using geturl works fine you say but that will always open a new window.....no way around that.

however looking at my last post of course nothing came through.....nothing was sent

Code:
on (release) {
	if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
		EmailStatus = "Please enter a valid E-mail address";
		gotoAndStop("Error");
	} else {
		my_email = email;
		my_name = from;
		my_comment = comment;
		Recipient = "urban_doood@hotmail.com";
		Subject = "Homepage Feedback";
		loadVariables("[URL unfurl="true"]http://homepages.zen.co.uk/cgi-bin/mailback",[/URL] this, "POST");
		gotoAndStop("Output");
		Newpage = "";
	}
}

try that why i ponder the loadvars problem
 
That again worked fine locally and there was no popup but it didn't work from my website.

Athlon 1800XP
Epox 8k5a2+
512mb DDR 2700
Gainward GF4 Ti4200 [284/572]
80gb WD
512k DSL
 
then i am stuck...sorry....everything is fine from the flash side.....the variables are being sent and received by both methods (although loadvars is to be prefered)

geturl works so the server can find the file


i just have nothing further to suggest
 
Ok fella thanks a lot for your time... I'll let you know if I manage to solve the problem.

Cheers again.

Athlon 1800XP
Epox 8k5a2+
512mb DDR 2700
Gainward GF4 Ti4200 [284/572]
80gb WD
512k DSL
 
Ok Bill I'll set your mind at ease, the problem was nothing to do with the actionscript it was...


So the only way I can see around it is to transfer tyranus.co.uk to a propper hosting company and upload my own cgi script.

Again, thanks a lot for your time it was well appreciated!

Al.

Athlon 1800XP
Epox 8k5a2+
512mb DDR 2700
Gainward GF4 Ti4200 [284/572]
80gb WD
512k DSL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top