Jump to content


Photo

Dynamic Update


  • Please log in to reply
3 replies to this topic

#1 HawkCode

HawkCode
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 14 April 2006 - 09:01 PM

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


#2 arifsor

arifsor
  • Members
  • PipPipPip
  • Advanced Member
  • 50 posts
  • LocationPakistan

Posted 14 April 2006 - 09:24 PM

[!--quoteo(post=364898:date=Apr 14 2006, 04:01 PM:name=HawkCode)--][div class=\'quotetop\']QUOTE(HawkCode @ Apr 14 2006, 04:01 PM) View Post[/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...
---------------------------
Power Demand Respect
Arif Sorathia

#3 lansing

lansing
  • Members
  • PipPip
  • Member
  • 15 posts
  • LocationClinton, TN USA

Posted 17 April 2006 - 10:09 PM

[!--quoteo(post=364908:date=Apr 14 2006, 05:24 PM:name=Arif)--][div class=\'quotetop\']QUOTE(Arif @ Apr 14 2006, 05:24 PM) View Post[/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 " 2 " 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 onBlur function or onChange function. I am also asuming that by default the quantity is set to 1?

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]

#4 inztinkt

inztinkt
  • Members
  • PipPip
  • Member
  • 21 posts
  • LocationCyprus ( OnThisIsland )

Posted 18 April 2006 - 11:38 AM

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.
<!-- // Blah // -->
OnThisIsland.com

The greatest leader is not always he who holds the most power, but he who has the ability to do the most with the power he has. - Inztinkt is Distinct!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users