HCProfessionals Posted March 5, 2011 Share Posted March 5, 2011 <input type='text' name='amount' /> | <?=number_format($amount_on_hand)?> What I am looking to do is show the amount_on_hand that is left as soon as someone types in the amount field (amount_on_hand - amount), and also not allowing the input to be more than the amount_on_hand. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted March 5, 2011 Share Posted March 5, 2011 That's going to be Javascript/AJAX. Moving thread . . . Quote Link to comment Share on other sites More sharing options...
jcanker Posted March 6, 2011 Share Posted March 6, 2011 Can you be a little more clear about the process? Pikachu is right--this can't be done in PHP without submitting the form. jQuery can handle this easily, and then if necessary, just send the data to php via $.ajax. ANything more specific than that would entail you explaining the intended operation. 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.