If stripping off all html from an input textfield is what you are looking
for,
You will be able to do this in a simple process: I'll put in a lil function
in here:

function stripHTML(input:String):String
{
var util_txt:TextField = _root.createTextField("util_txt",
_root.getNextHighestDepth(), -100,-100,100,100);
util_txt._visible = false;
util_txt.html = true;
util_txt.htmlText = input_txt.text ;
var output:String = util_txt.text;
util_txt.removeTextField();
return output;
}

// Now to use it, assuming the input textfield's instance name is input_txt,


var  strippedText:String = stripHTML(input_txt.text);

the strippedText variable will have the valid text, stripped off from the
html that the user typed in.

What the function does is, provide the text in ur input textfield into a
html textfield, and then retrieve the plain text from the html textfield.

This will make sure that the text does not have any html tags in it. (
please note - the code above isn't tested)

Hope that helps,
Arul Prasad
http://arulprasad.blogspot.com


On 5/25/07, Andy Andersson <[EMAIL PROTECTED]> wrote:

I have a scenario that I try to figure out, don't know if it is possible
yet, but maybe someone here on the list knows if it is?

Scenario are:
I have a couple of dynamic text fields and input text fields where people
write comments, send messages, display messages/blogs etc...
And it goes to the server and returns back to the flash app (everything
works fine) but, I don't want people to paste or write HTML tags in the
messages etc.. But if they do I want flash to filter/block those tags out
to
display in the flash app. So when the text gets back into the flash app,
it
should only contain real text, no HTML tags at all!

Is that possible?

Thanks
A



--
Arul Prasad
http://arulprasad.blogspot.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to