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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash and ASP - form help, please

Status
Not open for further replies.

LaPluma

Programmer
Feb 3, 2002
139
DE
Hello

I have a form created in FlashMX here:


and the code behind it is:

<HTML>
<HEAD>
<meta http-equiv=Content-Type content=&quot;text/html; charset=ISO-8859-1&quot;>
<TITLE>mainTest</TITLE>
</HEAD>
<BODY bgcolor=&quot;#FFFFFF&quot;>
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--Your e-mail addressSubmit--><OBJECT classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot;
codebase=&quot; WIDTH=&quot;550&quot; HEIGHT=&quot;400&quot; id=&quot;mainTest&quot; ALIGN=&quot;right&quot;>
<PARAM NAME=movie VALUE=&quot;mainTest.swf&quot;> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=&quot;mainTest.swf&quot; quality=high bgcolor=#FFFFFF WIDTH=&quot;550&quot; HEIGHT=&quot;400&quot; NAME=&quot;mainTest&quot; ALIGN=&quot;right&quot;
TYPE=&quot;application/x-shockwave-flash&quot; PLUGINSPAGE=&quot;</OBJECT>
</BODY>
</HTML>

The form is supposed to be right aligned (as the values in the code above indicate, but it doesn't), but that is somewhat peripheral at the moment.

What I am hoping to do is integrate the Flash form with ASP (CDONTS), and wonder if I may be able to read a good tutorial on it somewhere.

It is possible to read tutorials on CDONTS (for example, here:


but I am not sure how to integrate Flash with it. There is an added complication in that the Flash form uses checkboxes.

The form should send a copy of the message (that is the checked boxes, plus the e.mail address of the sender to the webmaster and a copy to the sender himself. It should also generate a pop-up informing the sender that the message has been received and a copy of his message has been sent to his e.mail box.

I know this is all heavy duty stuff, but would be grateful for any guidance.

Many thanks and best wishes.

LaPluma
 
I haven't used CDONTS for mailing from Flash before, we use JMAIL here, but the process should be similar. All you need to do in order to get your form working is use a loadvariables statement to transfer the variables to the ASP script. For example I use the line:

Code:
loadVariablesNum &quot;[URL unfurl="true"]http://www.idealnet.co.uk/lythgoes/news.asp&quot;,[/URL] 3, &quot;GET&quot;);
to send variables to a news script for processing. In your ASP you simply need to pick up the variables from the querystring (request.querystring(&quot;blah&quot;)).

To handle your checkboxes you'll need some auxilliary variables. Somewhere in your movie create a variable for each checkbox that you have, then, on the click event, determine which state the checkbox is in and set the appropriate variable to 0 or 1, or true or false, or whatever logical pair you want to use. You could even set a string to something like &quot;checkbox1 checked&quot; on a checked box, and &quot;&quot; on an empty one.

Looking back, I might have made this sound more complicated than it really is. It's actually terribly simple. If you feel you need an example let me know and I'll send you one. It won't use CDONTS, because I've not got any that do, but that's just a minor detail of implementation, you should be able to suss out the theory and get something working yourself.

HTH
 
Hello HotMadras

Many thanks for your post and my apologies for not replying sooner.

Yes, it was here (in your example), that I was getting stuck:

loadVariablesNum &quot; 3, &quot;GET&quot;);

but I think I have now just about managed to do it.

Many thanks again

LaPluma
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top