Is it possible to call from an external file in this code?

Discussion in 'JavaScript' started by schmidte, Oct 31, 2008.

  1. #1
    I have a "bad word filter" that I want to incorporate into a search engine,

    See example HERE

    However I'd like to keep the list of bad words out of the code and call them from an external file. Is it possible to do with the javascript I'm using now?

    When looking at the page source, the line I need to hide is:
    var swear_words_arr=new Array("cardinals","losers","choke","next year");

    Ed
     
    schmidte, Oct 31, 2008 IP
  2. rhoula

    rhoula Well-Known Member

    Messages:
    875
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Did you think about saving the words into an external javascript file example bad_words.js?
    I think this may work.
    Good Luck
     
    rhoula, Oct 31, 2008 IP
  3. joxtechnology

    joxtechnology Peon

    Messages:
    146
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeah its possible to place it in external file then just call it in your page.
     
    joxtechnology, Nov 4, 2008 IP