DeX Posted April 23, 2012 Share Posted April 23, 2012 This should be very simple I know but here is why it doesn't work for me. I have a purchase order displaying on the screen and I give my client the option to edit some of the fields before: a) the purchase order HTML gets sent to a PDF generator on the server to auto create and save it in PDF format. b) the purchase order HTML is also sent to the database to be saved in case they want to bring it up in the future and edit it again and re-save. Regardless of all that, I have the purchase order HTML on the screen with input (text) boxes around fields they can edit. When they edit the field and the HTML is sent to the database to be saved for later, the actual value property of the input element hasn't changed. So loading it up later shows the old value, not the one the client entered. So I tried to assign the .value property of the input element in Javascript prior to saving it to the database and it does indeed change the value visible inside the text box to whatever I have it set at but it doesn't actually change the .value property of the element. If I do an "inspect element" in Chrome, I can see the .value property hasn't changed from the original value. So how can I change the actual .value property associated with the element so that it displays with the new value when I pull the HTML code back out of the database for later use? Or any other suggestions welcome as well, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/261511-how-do-i-change-the-value-property-of-a-text-box-with-javascript/ Share on other sites More sharing options...
The Letter E Posted April 24, 2012 Share Posted April 24, 2012 Can you post the code that initially builds the input fields? Quote Link to comment https://forums.phpfreaks.com/topic/261511-how-do-i-change-the-value-property-of-a-text-box-with-javascript/#findComment-1340210 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.