PDA

View Full Version : Highlight a word in a extjs page by comparing it with words in database.



sruthi v m
21 Dec 2011, 10:29 PM
I need to create some advertisements with some text contents in it in a page called addcreation page,for some company. It's the company who ,depending on their like and dislike, approves the advertisement. for their approval, I have created a seperate page called approval page. Now what i need is the company can specify and save some words(exmple:bad words) that they never wants to be in their advertisements. If the advertisements created by me contains any of those words ,then in the approval page those words must be highlighted(or any other user intimation for bad words must be displayed.).Please help me to highlight those words in my second page,i.e, in my approval page.:)

mitchellsimoens
22 Dec 2011, 11:28 AM
If you have a string, then you can use RegEx to search and replace with a <span> to style the word