Hi, I'm receiving input from my user that is HTML. I would like to find
the length of the data within the string, discounting the presentation
logic.
What I mean is that if the user types "<B>Hello</B>", I would like to
find out the length is 5 (the length of 'hello').
Anyone have any ideas of how to this?
Cheers,
David
IchBin - 27 Nov 2005 19:30 GMT
> Hi, I'm receiving input from my user that is HTML. I would like to find
> the length of the data within the string, discounting the presentation
[quoted text clipped - 7 lines]
> Cheers,
> David
This is Java group not Javascript. Two different animals. That said look
at http://javascript.about.com/od/reference/g/slength.htm
Better yet a Javascript tutorial.
http://javascript.about.com/od/reference/a/js101.htm
http://www.w3schools.com/js/default.asp
http://www.pageresource.com/jscript/index4.htm
or just google for them

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Roedy Green - 27 Nov 2005 20:38 GMT
>What I mean is that if the user types "<B>Hello</B>", I would like to
>find out the length is 5 (the length of 'hello').
>
>Anyone have any ideas of how to this?
you could use StripEntities and/or StripTags and look at the string
length.
See http://mindprod.com/products1.html#ENTITIES
site is down right now as server is being moved.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.