HawkCode Posted April 14, 2006 Share Posted April 14, 2006 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 Link to comment Share on other sites More sharing options...
arifsor Posted April 14, 2006 Share Posted April 14, 2006 [!--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... Quote Link to comment Share on other sites More sharing options...
lansing Posted April 17, 2006 Share Posted April 17, 2006 [!--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] Quote Link to comment Share on other sites More sharing options...
inztinkt Posted April 18, 2006 Share Posted April 18, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.