
Welcome Guest
|
#1
|
|||
|
|||
|
Hello all,
I require some assisstance please, any help would be great and very appreciated. I have a flash site with an ASP form in it. All works perfect and all input boxes work correctly, however, only the Message/Comment input box does not work correctly. When you fill in text and you skip a full line, upon receiving the email, all you can see is all the text filled in up to the point where you skip a line. I have tried a million things, so far nothing works. [Here is the Form code in FLA. File: stop(); //-- Imports the tween classes import flash.display.BitmapData; import mx.transitions.Tween; import mx.transitions.easing.*; //-- Sets your Email address (where you want the email //-- recieved) and the subject of the emails. var myEmail:String = "myname@email.com"; var mySubject:String = "your subject"; //-- The initial display messsage on the form when the frame is loaded. statusTxt.text = "Don't forget to enter your email!"; //-- Sets the colors of the 3 text boxes. messageTxt.backgroundColor = 0xFFFFFF; emailTxt.backgroundColor = 0xFFFFFF; nameTxt.backgroundColor = 0xFFFFFF; hotelTxt.backgroundColor = 0xFFFFFF; phoneTxt.backgroundColor = 0xFFFFFF; stayTxt.backgroundColor = 0xFFFFFF; //-- The initial animation for the 3 input boxes when the frame is loaded. nameMoveIn = new Tween(nameTxt, "_xscale", Back.easeOut, 0, 100, 1.3, true); emailMoveIn = new Tween(emailTxt, "_xscale", Back.easeOut, 0, 100, 1.3, true); hotelMoveIn = new Tween(hotelTxt, "_xscale", Back.easeOut, 0, 100, 1.3, true); phoneMoveIn = new Tween(phoneTxt, "_xscale", Back.easeOut, 0, 100, 1.3, true); dateMoveIn = new Tween(dateTxt, "_xscale", Back.easeOut, 0, 100, 1.3, true); messageMoveIn = new Tween(messageTxt, "_yscale", Strong.easeOut, 0, 100, 1.3, true); //-- The function that displays the messages when the email is submitted. statusMsg(); //--------------------------------------------- //-- Function that packages the data to be sent to the ASP page (mail.asp). packageData = function () { form = new LoadVars(); form.f_name = nameTxt.text; form.f_email = emailTxt.text; form.f_message = messageTxt.text; form.f_hotel = hotelTxt.text; form.f_phone = phoneTxt.text; form.f_booking = bookingTxt.selectedData; form.f_persons = personsTxt.selectedItem.data; form.f_tour = tourTxt.selectedItem.data; form.f_date = dateTxt.text; form.f_stay = stayTxt.selectedItem.data; form.f_myEmail = myEmail; form.f_mySubject = mySubject; //-- Validates the email messages and displays several error messages. if (emailTxt.text.length == 0 || messageTxt.text.length == 0 || nameTxt.text.length == 0) { statusTxt.text = "ERROR: COMPLETE ALL FIELDS."; } else if (emailTxt.text.indexOf("@") == -1 || emailTxt.text.indexOf(".") == -1) { statusTxt.text = "ERROR: INVALID EMAIL ADDRESS."; } else { statusTxt.text = "YOUR MESSAGE HAS BEEN SENT."; nameTxt.text = ""; emailTxt.text = ""; messageTxt.text = ""; hotelTxt.text = ""; phoneTxt.text = ""; bookingTxt.selectedData = ""; personsTxt.selectedItem.data = ""; tourTxt.selectedItem.data = ""; dateTxt.text = ""; stayTxt.selectedItem.data = ""; } //-- Sends and loads the packaged data into the ASP script (mail.asp) //-- If you sending through a REMOTE SMTP server, Replace "mail.asp" with "mail_remote.asp" below form.sendAndLoad("mail_remote.asp", form, "POST"); }; //-- Submit button that runs the packageData function. send_btn.onRelease = function() { packageData(); statusMsg(); //trace(form.f_message); }; //-- Runs and animates the status messages. function statusMsg() { statusTypeIn = new Tween(statusTxt, "_xscale", Strong.easeOut, 0, 100, 1, true); statusTypeIn.onMotionFinished = function() { statusFadeOut = new Tween(statusTxt, "_xscale", Strong.easeIn, 100, 0, 2, true); }; } Here is the ASP. file code: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <%Option Explicit%> <% ' Variables Declared Dim EmailFrom Dim EmailTo Dim Subject Dim ContactName Dim Message Dim IPadd Dim Hotel Dim BookingEnquiry Dim Stay Dim When Dim Tour Dim Persons Dim Phone ' Requests the sent data from the flash form. EmailFrom = Trim(Request.form("f_email")) EmailTo = Trim(Request.form("f_myEmail")) Subject = Trim(Request.form("f_mySubject")) ContactName = Trim(Request.form("f_name")) Hotel = Trim(Request.form("f_hotel")) Message = Trim(Request.form("f_message")) IPadd = Request.ServerVariables("remote_addr") BookingEnquiry = Trim(Request.form("f_booking")) Stay = Trim(Request.form("f_stay")) Phone = Trim(Request.form("f_phone")) Hotel = Trim(Request.form("f_hotel")) Persons = Trim(Request.form("f_persons")) Tour = Trim(Request.form("f_tour")) When = Trim(Request.form("f_date")) ' The HTML body that will be in the Email. Totally editable... ' Feel free to design your message. You can use HTML and keep it between ' the quotes Dim Body Body = Body & "Booking/Enquiry request from website<br /><br />" Body = Body & "[ IP: " & IPadd & " ]<br /><br />" Body = Body & "Name: " & ContactName & "<br /><br />" Body = Body & "Email: " & EmailFrom & "<br /><br />" Body = Body & "Hotel: " & Hotel& "<br /><br />" Body = Body & "Duration on island: " & Stay& "<br /><br />" Body = Body & "Phone: " & Phone& "<br /><br />" Body = Body & "Booking/Enquiry: " & BookingEnquiry& "<br /><br />" Body = Body & "Guests: " & Persons& "<br /><br />" Body = Body & "Which Tour: " & Tour& "<br /><br />" Body = Body & "When: " & When& "<br /><br />" Body = Body & "Message: " & Message& "<br />" ' Sends the Email using CDO.Message object Dim mail Set mail = Server.CreateObject("CDO.Message") mail.To = EmailTo mail.From = EmailFrom mail.Subject = Subject mail.HTMLBody = Body ' smtp server information mail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server mail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="localhost" 'Server port mail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 mail.Configuration.Fields.Update mail.Send ' Closes the message Set mail = nothing %> Well guys, thanks for taking a look. |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| flash form go to confirm but email do not delivered ? | lse123 | Flash MX 2004 |
5 | 02-22-2007 10:12 AM |
| PHP and ASP Email Form | Jeremy78 | Flash MX 2004 |
1 | 02-02-2007 08:03 AM |
| Tutorial on How to attach images to a Flash email Form | cayohueso | Server Side | 1 | 09-01-2005 02:52 AM |
| Open Letter to Macromedia | molaram | General Flash | 10 | 02-18-2005 01:29 AM |
| Dynamic Text and Coding and stuff. | Kainte | Newbies |
2 | 08-24-2003 11:18 PM |





