I need to strip any HTML coding found in Field A and store the result in Field B. In other words, Field B should be just the text, no formatting.
I assumed the utils.stringReplace() function would be the place to start experimenting. However along the way I discovered this function will not support fields or variables, only hard coded text.
var vText = 'Some text to test';
globals.gutility1 = vText;
utils.stringReplace(vText, 'test', 'xxx');
globals.gutility2 = vText;
returns ‘Some text to test’. No change!!
However the following works fine:```
globals.gutility2 = utils.stringReplace(‘Some text to test’, ‘test’, ‘xxx’);
Anyone know of a method, a bean?, to strip HTML code and leave just the text? And what gives with uttils.stringReplace()?
You can replace all tags with the following code but… It will replace everyting between ‘<’ and ‘>’ NOT making any difference between a real tag or some textual thing!
It should be there Harjo. (what version are you running?)
If not , then it’s a (displaying) bug
There’s no intention of removing this method.
I’m running 3.0a12 and it’s in there.
Servoy Developer
Version R2 2.2.3-build 335
Java version 1.5.0_05-48 (Mac OS X)
Guilty as charged in not selecting a HTML area formatted field - so just to confirm that I do see it when selecting that type of field.
However, I also searched the help files and could not find a reference to it through contents, index or search - and, please note that I fully expect Marc to come back, point me to the exact location and tell me what a wally I am, here
Harry Catharell:
Servoy Developer
Version R2 2.2.3-build 335
Java version 1.5.0_05-48 (Mac OS X)
Guilty as charged in not selecting a HTML area formatted field - so just to confirm that I do see it when selecting that type of field.
However, I also searched the help files and could not find a reference to it through contents, index or search - and, please note that I fully expect Marc to come back, point me to the exact location and tell me what a wally I am, here
Cheers
Harry
Harry,
The pace and flurry of new features and functions in Servoy has been
so fast since the release of Servoy 2.2 (and its documentation release),
that we have not yet released the latest online, printed or PDF versions of
the documentation.
As a result, the functions and features in Servoy may not match the
version of the documentation you are using.