Jump to content

Archived

This topic is now archived and is closed to further replies.

HawkCode

Dynamic Update

Recommended Posts

Hi,

I have a form I'm working on where I have a Quantity Field and there is a cost for each. If an Item is $25.00 and they enter 2 how can I update another field with the result (2*25)???

Preferably the field updated should be read only.

Thanks!

Rich

Share this post


Link to post
Share on other sites
[!--quoteo(post=364898:date=Apr 14 2006, 04:01 PM:name=HawkCode)--][div class=\'quotetop\']QUOTE(HawkCode @ Apr 14 2006, 04:01 PM) [snapback]364898[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi,

I have a form I'm working on where I have a Quantity Field and there is a cost for each. If an Item is $25.00 and they enter 2 how can I update another field with the result (2*25)???

Preferably the field updated should be read only.

Thanks!

Rich
[/quote]

need more description...

Share this post


Link to post
Share on other sites
[!--quoteo(post=364908:date=Apr 14 2006, 05:24 PM:name=Arif)--][div class=\'quotetop\']QUOTE(Arif @ Apr 14 2006, 05:24 PM) [snapback]364908[/snapback][/div][div class=\'quotemain\'][!--quotec--]
need more description...
[/quote]I don't know the answer, but I can explain so that maybe you can help him.

He has input boxes that is for a ordering system. He wants to add a Quantity box so the user can type in they want 2 of the $25.00 items. When the user's pushes the number key [i][b]" 2 "[/b][/i] he wants the Total Price to show $50.00.

He wants real time multiplication of inputted values...I would assume this would need to be in JavaScript with using a [i]onBlur[/i] function or [i]onChange[/i] function. I am also asuming that by default the quantity is set to [b]1[/b]?

Arif...you might want to post this in the JavaScript section of this forum & might get answered quicker: [a href=\"http://www.phpfreaks.com/forums/index.php?showforum=6\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showforum=6[/a]

Share this post


Link to post
Share on other sites
as stated above, this would require javascript. a script that would run onChange to check the contents of the selection and then perform an action with it and then release it to the read only text field.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.