M
macyp
I am developing a search page. If the users enter, words like "and",
"an" etc, it gives an error. I read something abt noise words. I want
to display a friendly error message to the users if they enter noise
words.
I am storing all the noise words in an array, and string comparing the
keyword the user entered with each element of the array, else
redirecting them to a searchresults page. But when I am doing this, it
is redirecting to the searchresults page anyway...with an error abt the
noise words.
How can I do error handling so that, when the error is about noise
words, it displays an alert box, or something like that and asks the
user to redefine their search.
Any suggestions?
"an" etc, it gives an error. I read something abt noise words. I want
to display a friendly error message to the users if they enter noise
words.
I am storing all the noise words in an array, and string comparing the
keyword the user entered with each element of the array, else
redirecting them to a searchresults page. But when I am doing this, it
is redirecting to the searchresults page anyway...with an error abt the
noise words.
How can I do error handling so that, when the error is about noise
words, it displays an alert box, or something like that and asks the
user to redefine their search.
Any suggestions?