chrisjwebb1978 Posted May 28, 2012 Share Posted May 28, 2012 HI all I have a page that allow individuals to use a select drop down box to choose from a number of items for an invoice. What i would like to happen, is when an item from the list is chosen, the current number in stock generates in a disabled text box to the right. This obviously needs to happen before form submission, but i am a newbie at javascript and need to have it work alongside php. Any guidance is appreciated. Link to comment Share on other sites More sharing options...
niche Posted May 28, 2012 Share Posted May 28, 2012 (edited) The simplest way is to add a hidden input that will hold that value, give the input an id, target that id with an event attached to the form, and change it with getElementById(). EDIT: You can store the item's value in $_SESSION instead of a table. Edited May 28, 2012 by niche Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now