"David VanHorn" <[EMAIL PROTECTED]> wrote:
> Sorry, I've been away from this for a while.
> Let me peel back a bit.
>
> When I generate the form, I pull up from the db, the quantity on hand, and
> the quantity already committed to orders. So:
> $max=$quantity-$commit is the maximum number I can allow someone to order.
>
> In the form, I'd like to get to a mechanism that would allow entry (by
most
> any means really) of an order number >0 and less than $max.
> I know I can do it by submitting the form, but it would be irritating to
> have to do that..
>
> Maybe I should just display $max, and let it go at that.

Trust your users, do ya?  <wry grin>  If you don't want to handle validation
on the server side using PHP, you should probably look at a JavaScript
solution that checks to see if the number is between a given range after
some event (like the form element losing the focus) and popping up a dialog
box if it's not valid.  Try internet.com's Javascript area or another JS
site to find a code snippet that does what you want.

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to