It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes Input parameter check function ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Input parameter check function ??" Watch "Input parameter check function ??" New topic

Input parameter check function ??

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
I want to check input parameter of serach text box which is supplied by user.User have to give input parameter for serach like this(a%,b%,c% etc.)if they give any input parameter other than this then i want to give alert message to user.Can any one please guide me how i can write this function.
Thanks & Regards
qu shihong

Joined: Feb 27, 2003
Posts: 8
you should learn regular expression.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Here is the basic idea....

Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
Usually I do such thing server side.
I mean, it is easy to bypass JS validation and send anything to your server.
That includes quotes, semicolons and SQL commands
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi Eric,
Thanks for ur basic idea.
Thanks & Regards
It is sorta covered in the JavaRanch Style Guide.
subject: Input parameter check function ??
Similar Threads
urgent help needed
ugrent help needed
urgent help needed
which IDE to learn Java with?
question on client side soap binding stub on wsdl complext type element