A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: mailto / ascii character troubles

  1. #1
    Moderator
    FK Junkie
    TiefighT's Avatar
    Join Date
    Aug 2000
    Posts
    683
    Hello ,

    I am having a little trouble with a flash program I am doing for work.

    Does anyone know how to pass a carrage return in a mailto statement? I can use %20 to pass spaces, but %13 does not work.

    I am using Flash 5, and have tried the following methods:

    chr (13) - nope

    character = new String (13)
    cr = character.fromCharCode (c1,c2)
    - Couldn't ever figure it out how to use it (never could get flash to recognize "fromCharCode" as a method)

    Any help would be great

    Thanks

  2. #2
    juggernart me2222's Avatar
    Join Date
    Jun 2000
    Posts
    1,322
    Hi Tiefight,
    the URL encoding thing (%xy) works with hexadecimal numbers. The right expression is therefore %0D (D is the hex number for 13)
    Take a look at http://www.flashbible.com/members/Da...L_encoding.htm
    (I don´t have Flash5 yet )

  3. #3
    Moderator
    FK Junkie
    TiefighT's Avatar
    Join Date
    Aug 2000
    Posts
    683
    Thanks for the reply,

    Good idea, and the link was nice, but still no luck .

    Here is an example of what I am trying to do. It will open a new e-mail addressed to "[email protected]" with the subject "This is a test" and a buch of attempts to add a carage return to the body, none of which are successfull:

    getURL ("mailto:[email protected]?subject=This%20is%20a%20tes t&body=test" + "%13test" + "%0Dtest" + "%Dtest" + chr (13) + "test" + chr (D) + "test");

    The resulting body text is:

    testtesttest%Dtesttesttest

    Any other ideas?

    --Edited--
    By the way, I believe the "+"s used to concatenate the mailto statment should be replaced with "&"s in Flash 4

  4. #4
    juggernart me2222's Avatar
    Join Date
    Jun 2000
    Posts
    1,322
    Hi again.
    Looks like you mixed up the syntax! In the "subject=" you don´t use quotations. That´s allright.
    But why do U suddenly use quotations in your "body=" definition?
    I tested this:
    Get URL ("mailto:[email protected]?subject=This%20is%20a%20test&body=test%0 dtest1%0dtest2%0dtest3+test4")
    and it worked, the output in my email app is:
    To: [email protected]
    Subject: This is a test

    test
    test1
    test2
    test3+test4

    (the "+" thing for space don´t work)

    And this gave me the same result (space instead of %20):
    Get URL ("mailto:[email protected]?subject=This is a test&body=test%0dtest1%0dtest2%0dtest3 test4")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center