Get amount calculated by js file to display in HTML form |
Get amount calculated by js file to display in HTML form |
luvnrocs |
Jul 17 2008, 10:10 PM
Post
#1
|
Group: Members Posts: 2 Joined: 17-July 08 Member No.: 6,206 |
I have an html form which references some functions that are in a separate javascript file. Right now there is a text input field on the form that the javascript will fill in an amount based on selections made in the form. What I'd like to do is to change the input field so that the amount just displays and cannot be changed by the user, but I can't figure out how to display the amount the way I want to.
Any help would be appreciated. |
pandy |
Jul 17 2008, 10:44 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Make the input 'readonly'.
http://htmlhelp.com/reference/html40/forms/input.html |
little highlander |
Oct 21 2008, 04:31 PM
Post
#3
|
Group: Members Posts: 3 Joined: 16-October 08 Member No.: 6,911 |
I have an html form which references some functions that are in a separate javascript file. Right now there is a text input field on the form that the javascript will fill in an amount based on selections made in the form. What I'd like to do is to change the input field so that the amount just displays and cannot be changed by the user, but I can't figure out how to display the amount the way I want to. Any help would be appreciated. to display in a form all you do is in ur js write document.nameOfTheForm.nameOfTheInput.value= youCalculation; |
Lo-Fi Version | Time is now: 19th April 2024 - 04:26 PM |