lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kelvin Tan" <kel...@relevanz.com>
Subject Re: Javascript query validation
Date Wed, 24 Apr 2002 10:31:54 GMT
FWIW, here's an updated version. The previous version ran into some issues
with handling complex queries (like (foo:("bar"))) and stuff. Added
validation to ensure quote marks are closed.

Kelvin
----- Original Message -----
From: "Kelvin Tan" <kelvin@relevanz.com>
To: <lucene-user@jakarta.apache.org>
Sent: Wednesday, April 10, 2002 5:41 PM
Subject: Javascript query validation


> Note: this file has only been tested in IE 6.0.
>
> Frustrated with curious TokenMgrErrors and ParseExceptions in your web
> forms? (I was) Not so good at regular expressions? (I'm not)
>
> See attached for a (simple) implementation of a regex-based javascript
query
> validator. Currently, only wildcards (*), plus and minus (+, -),
parentheses
> (round brackets) and field declarers (:) are validated for. The reason's
coz
> they're the most commonly used (IMHO) and I'm lazy.
>
> If you do add to it/fix any bugs, I'd appreciate if you could drop me a
buzz
> so I can update it, or post it to the list for everyone to use.
>
> Note: I've found that in IE at least, hitting the enter button with a text
> field in focus irritatingly submits the form without giving me a chance to
> validate the query. I've had to disable the "Enter" key for the form
fields.
> Email me offline if you need help with this.
>
> Regards,
> Kelvin Tan
>
> Relevanz Pte Ltd
> http://www.relevanz.com
>
> 180B Bencoolen St.
> The Bencoolen, #04-01
> S(189648)
>
> Tel: 6238 6229
> Fax: 6337 4417
>
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>

Mime
View raw message