Yeah, just tried it real quick... This looks like it gives you the
output you want (I think):
function convertAmp(str1){
newStr = str1.split("&").join("&")
return newStr;
}
var strOriginal = "This - & - represents an ampersand.";
var strConverted = convertAmp(strOriginal);
ta1.text = strConverted;
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Chyko
Sent: Friday, January 20, 2006 2:23 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Maintaining HTML special char codes in
aHTMLtextfield?
If you wanted it to actually output "&" I'm assuming you could
capture the & in the string and replace it with & - which
would theoretically output "&" - haven't actually tried this though.
Which I guess more generically would boil down to you replacing all your
"&" with "&" - that would take care of it for all the cases (&,
", < etc).
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sascha
Balkau
Sent: Friday, January 20, 2006 1:22 PM
To: flashcoders
Subject: [Flashcoders] Maintaining HTML special char codes in a
HTMLtextfield?
Hi,
does somebody know if it's somehow possible to get HTML special
characters
like &, ", < and > to be outputted in a Flash HTML
enabled
textfield without turning them into their conversions?
I've tried various ways like using escape sequences with unicode etc.
but
the textfield still converts them. There is no way to turn this behavior
off
for a HTML textfield but I'm wondering if there is some magical method
to
preprocess the string so that the textfield wouldn't recognize the
special
char sequences.
Otherwise can somebody confirm that there is absolutely no way to do
that?
In that case a textfield property to turn the conversion off would be a
welcome feature in 8.5.
Thanks for any hint!
Sascha
--
Flash Game Programming Wiki http://fgpwiki.corewatch.net/
H1DD3N.R350URC3 http://hiddenresource.corewatch.net/
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders