File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 15385
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
I agree. Here's the link:
subject: Input parameter check function ??
It's not a secret anymore!