-
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 :D
-
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 :( )
-
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? :D
--Edited--
By the way, I believe the "+"s used to concatenate the mailto statment should be replaced with "&"s in Flash 4
-
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")