Re: [PHP] Variable quantity chooser.

2001-02-08 Thread Jørg V . Bryne

The slider control is not a regular html-form-object. (on Windows you can
see one in the recycle-bin properties). If you want to, or need to, i guess
you can use an active-x control og make a javascript to do it. I wouldn't
reccomend either...

However if you need to set a not so spesific number you can use multiple
radiobuttons or something like that. I made one just in this case to see if
it's useful. One never know what will come in handy later on :-)
It's not excatly what you wanted, but you might want to take a look at
www.omnimedia.no/slider.php3
for the source and a quick try. Doesn't really do anything, though :-)
(btw: you don't need JS if you don't need to display the current value, as
it will be submitted as '$val')

-Y


- Original Message -
From: "Steve Werby" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "David VanHorn" [EMAIL PROTECTED]
Sent: Thursday, February 08, 2001 5:50 AM
Subject: Re: [PHP] Variable quantity chooser.


 "David VanHorn" [EMAIL PROTECTED] wrote:
  Is there a way, using PHP, to generate a quantity chooser that maxes out
 at
  the quantity on hand?  IOW, I have $quantity from the database, for a
 given
  line item, and I'd like to have a slider that lets you run up to, but
not
  over, the quantity on hand.
 
  This might be more of an HTML question..

 I'm sure I can help you, but I'm not able to follow your terminology.
 What's a "quantity chooser" and what's a "slider"?  Are you referring to
 select boxes?  I'm not trying to be rude, I just don't understand what
 you're referring to.  I'm confident you can accomplish what you want using
a
 loop, but perhaps you can restate your question using different
terminology
 and some more details.

 --
 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]



-- 
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]




Re: [PHP] Variable quantity chooser.

2001-02-08 Thread David VanHorn



I'm sure I can help you, but I'm not able to follow your terminology.
What's a "quantity chooser" and what's a "slider"?  Are you referring to
select boxes?  I'm not trying to be rude, I just don't understand what
you're referring to.  I'm confident you can accomplish what you want using a
loop, but perhaps you can restate your question using different terminology
and some more details.

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.


--
Dave's Engineering Page: http://www.dvanhorn.org
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9



-- 
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]




Re: [PHP] Variable quantity chooser.

2001-02-08 Thread Steve Werby

"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]




[PHP] Variable quantity chooser.

2001-02-07 Thread David VanHorn


Is there a way, using PHP, to generate a quantity chooser that maxes out at 
the quantity on hand?  IOW, I have $quantity from the database, for a given 
line item, and I'd like to have a slider that lets you run up to, but not 
over, the quantity on hand.

This might be more of an HTML question..
--
Dave's Engineering Page: http://www.dvanhorn.org
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9



-- 
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]




Re: [PHP] Variable quantity chooser.

2001-02-07 Thread Steve Werby

"David VanHorn" [EMAIL PROTECTED] wrote:
 Is there a way, using PHP, to generate a quantity chooser that maxes out
at
 the quantity on hand?  IOW, I have $quantity from the database, for a
given
 line item, and I'd like to have a slider that lets you run up to, but not
 over, the quantity on hand.

 This might be more of an HTML question..

I'm sure I can help you, but I'm not able to follow your terminology.
What's a "quantity chooser" and what's a "slider"?  Are you referring to
select boxes?  I'm not trying to be rude, I just don't understand what
you're referring to.  I'm confident you can accomplish what you want using a
loop, but perhaps you can restate your question using different terminology
and some more details.

--
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]