lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suneethad <suneet...@india.adventnet.com>
Subject Re: Javascript query validation
Date Thu, 11 Apr 2002 10:44:55 GMT
Hi Kelvin,
                that was quiet useful

Regards,
Suneetha
Kelvin Tan wrote:

> 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
>
>   ------------------------------------------------------------------------
>                               Name: luceneQueryValidator.js
>    luceneQueryValidator.js    Type: JavaScript Program (application/x-javascript)
>                           Encoding: quoted-printable
>
>   ------------------------------------------------------------------------
> --
> 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