Skip to main content
July 1, 2010
Question

Flash CS4 Input Text Fields

  • July 1, 2010
  • 3 replies
  • 1135 views

I have several input text fields that I need to be placed in the body of an email.  Here is the code I have...

submit_request_btn.addEventListener(MouseEvent.CLICK, sendData);

function sendData(evtObj:MouseEvent):void {
    trace(date_txt.text);
    trace(company_txt.text);
    trace(address_txt.text);
    trace(name_txt.text);
    trace(email_txt.text);
    trace(phone_txt.text);
    trace(project_txt.text);
    trace(location_txt.text);
    trace(estimate_txt.text);
    trace(start_txt.text);
    trace(FTP_txt.text);
    trace(emailbox_txt.text);
    trace(send_txt.text);
    var theEmail:URLRequest = new URLRequest ("mailto:lwebster@caddjm.com?from="+email_txt.text+"{’\n’}&subject= Request Estimate&body="+date_txt.text+""+address_txt.text+""+name_txt.text+""+phone_txt.text+""+project_txt.text+""+location_txt.text+""+estimate_txt.text+""+start_txt.text+""+FTP_txt.text+""+emailbox_txt.text+""+send_txt.text+""+company_txt.text);
    navigateToURL(theEmail);
}

It works, but when the email opens up, if i entered "test" in all the fields, it appears like this:

testtesttesttesttestesttesttesttesttesttesttesttest

how can I code it so there are line breaks between each piece of text that the user inputs?

thanks in advance for the help!

This topic has been closed for replies.

3 replies

Participating Frequently
May 26, 2011

try "\r\n" which is like a carriage return and a line feed.

July 2, 2010

Does anybody have any suggestions to solve this issue?


Ned Murphy
Legend
July 1, 2010

Try placing "\n" between each text value in the body instead of just the ""

July 1, 2010

this yields the same result

testtesttesttesttesttesttesttesttesttesttesttest