1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    7
    Vote Rating
    0
    sruthi v m is on a distinguished road

      0  

    Default Unanswered: Highlight a word in a extjs page by comparing it with words in database.

    Unanswered: Highlight a word in a extjs page by comparing it with words in database.


    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.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    If you have a string, then you can use RegEx to search and replace with a <span> to style the word
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1