[javascript-dev] Searching through a string
Wesley Smith
wesley.hoke at gmail.com
Sun Nov 4 20:12:24 MST 2007
- Previous message: [javascript-dev] Searching through a string
- Next message: [javascript-dev] Searching through a string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
inputString is an array in your code. Perhaps you need to do inputString[i].search(pattern). wes On 11/4/07, lists at zdomain.net <lists at zdomain.net> wrote: > Hi all: > > I've been trying to get the following search script to work, but I get > "inputString.search is not a function". What am I doing wrong? > > ----BEGIN SCRIPT---- > function anything() > { > var pattern=/href/; > inputString = arrayfromargs(messagename, arguments); > post("LENGTH IS " + inputString.length); > for (var i=0; i<inputString.length; i++){ > if (inputString.search(pattern)){ > outputString="There it is!"; > } > else{ > outputString = "Sorry, not here!"; > } > } > bang(); > } > ----END SCRIPT---- > > Thanks in advance, > > -R > _______________________________________________ > javascript-dev mailing list > javascript-dev at cycling74.com > http://www.cycling74.com/mailman/listinfo/javascript-dev >
- Previous message: [javascript-dev] Searching through a string
- Next message: [javascript-dev] Searching through a string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
