Form using ASP script

I am using an ASP script to execute my form in flash. The only problem is I need to add a hidden field to make it work. Would I ba able to do that in flash?

This is the code I need to input:


<INPUT TYPE="HIDDEN" NAME="submit_to" VALUE "[email protected]">

Please let me know if this is possible. Thanks.

I really don’t fully understand your question, so I’m going to try to answer it as best I can.

Are you populating the values from a ASP page to Flash or the other way around?

If you are sending values to Flash via ASP then try this. In ASP,
instead of populating a value in a hidden field, which you can still have. assign it to a variable: ie.
response.write "[email protected]&textbox=ttt"

Then in flash you call your asp page via the LoadVariables function and then just grab the variable names. ie.
myemail and textbox.

Please clearify your question, thanks.

thank you for responding take a look at my code:

on (release) {
if (message ne “”) {
loadVariablesNum(“http://www.myurl.com/mailscript/addformmail.asp”, 0, “POST”);
myemail = "[email protected]&textbox=ttt";
gotoAndPlay(2);
}
}

does the “&textbox=ttt” need to be there?

This ASP script works for the html side of my site. I used hidden fields to call my email address. Is this the proper way to call my email address with flash? I can’t get it to work, I used a several different ways. I tried to use “submit_to” as a variable, that didn’t work either. Please help if you know how. Do you have a sample or anything? Thank you.

I’m still a little confuse on your asp page. I’ll like to see your asp code.

This how I did part of mine.

loadVariablesNum (“http://porky/scripts/test2.asp”, “0”, “POST”);

The code in the test2.asp page has the following

response.write “sFilePath=http://Porky/scripts/”

All I do in flash is assign a variable to my variables in ASP. Then I make sure that the asp page has been executed completely so I can be certain the have the values.

var FilePath= sFilePath; //Coming from the ASP file

Thats it.

Another problem I see in your flash code is this: Remember when you use the loadVariablesNum function to access your variables
it takes a few seconds to access the variables from your asp page. so if you do a trace on the flash variable following the LoadVariablesNum function you will get a undefined value for your flash movie. Alot of people do is to go to another frame and
wait for all of the asp values to be executed than assign the
flash variable to the asp variable. I hope I make sense.

Flash code:
loadVariablesNum(“http://www.myurl.com/mailscript/addformmail.asp”, 0, “POST”);

ASP CODE:
<%
Dim strTo, strName, strEmail, strPhone, strMessage
Dim objCDOMail 'The CDO object

strTo = "[email protected]"
strName = Request.Form(“name”)
strEmail = Request.Form(“email”)
strPhone = Request.Form(“phone”)
strMessage = Request.Form(“message”)

Set objCDOMail = Server.CreateObject(“CDONTS.NewMail”)

objCDOMail.From = “User”
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.Body = strBody
objCDOMail.Send
Set objCDOMail = Nothing
%>

I don’t know what you meant with the secon part. Could you send a sample?

Thanks.

Sorry I don’t have a good .fla example. But let me try again.

on (release) {
if (message ne “”) {
loadVariablesNum(“http://www.myurl.com/mailscript/addformmail.asp”, 0, “POST”);
myemail = "[email protected]&textbox=ttt";
gotoAndPlay(2);
}
}

I assume message is a variable in your asp page to flag if you executed all of your variables in the addformmail.asp page.

Lets also assume your got another variable in the asp page called xyz. ie. response.write “xyz=myemailaddress”

in Flash to access the xyz value, do as follows

on (release) {
if (message ne “”) {
loadVariablesNum(“http://www.myurl.com/mailscript/addformmail.asp”, 0, “POST”);
var myemail = xyz;
gotoAndPlay(2);
}
}

Thats it, the only other problem you may have is that after the flash loadVariablesNUm function is executed and you do a trace on the myemail variable you may get undefined. Because the asp
page has not fully. Logically it doen’t make since as a ASP programmer. So to get around it, have a gotoandPlay(frame) to go to another frame and wait until the asp page has been fully executed. Lets see if I can find a good .fla example.

I created a sample .fla file which is done a little different then you had it. I’ll send it when I get home tonight. I hope it helps…

Sorry for the delay, but here is a sample a little different though.

But you get the idea, just change the url to point to your asp file.

catch me on MSN: [email protected]

I will help you…