How would I only search the first word? Let us say I have 3 words in the list:
John Doe
Bob Johnson
Kevin Smith
If I typed "J" into the textbox then Bob Johnson would return as a match since it searches last names also. Is there a way where I can only search the first names or just search simply from left to right?
One more question: how can I modify the keystrokes in the JavaScript file (ex: add more shortcuts of my own)? Thanks, I'm pretty new to JavaScript.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also have the very same issue here. Tried to edit the source code to get only the content starting with the word not containing. I think it's [runMatchingLogic] function to deal with this issue but can't be pretty sure which part should be edited.
Thank you for this great source and the support in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
inhwajyoo,
I did what you suggested, it worked for the purpose of matching only the first word. but it break something else. for example, i typed 'a' then selected a word from the list, if i typed in 'a' again, the list wouldn't show up, unless i typed other characters.
Can someone help with this plz :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How would I only search the first word? Let us say I have 3 words in the list:
John Doe
Bob Johnson
Kevin Smith
If I typed "J" into the textbox then Bob Johnson would return as a match since it searches last names also. Is there a way where I can only search the first names or just search simply from left to right?
One more question: how can I modify the keystrokes in the JavaScript file (ex: add more shortcuts of my own)? Thanks, I'm pretty new to JavaScript.
I also have the very same issue here. Tried to edit the source code to get only the content starting with the word not containing. I think it's [runMatchingLogic] function to deal with this issue but can't be pretty sure which part should be edited.
Thank you for this great source and the support in advance.
in the runMatchingLogic function, I just commented out the part below :
/*else if (mEntry.match(re1m) || mEntry.match(re2m)) {
if (!standalone && displayMatches) {
siw.matchCollection[j] = new smartInputMatch(entry, mEntry.replace(/\>/gi,'}').replace(/\</gi,'{').replace(re1,"$1<b>$2</b>").replace(re2,"$1<b>$2</b>"));
}
tempCollection[j] = entry;
j++;
}*/
and it works just like I wished it would be.
Hope it could be helpful for others too. :)
inhwajyoo,
I did what you suggested, it worked for the purpose of matching only the first word. but it break something else. for example, i typed 'a' then selected a word from the list, if i typed in 'a' again, the list wouldn't show up, unless i typed other characters.
Can someone help with this plz :)