The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Get amount calculated by js file to display in HTML form
luvnrocs
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
little highlander
post Oct 21 2008, 04:31 PM
Post #3





Group: Members
Posts: 3
Joined: 16-October 08
Member No.: 6,911



QUOTE(luvnrocs @ Jul 17 2008, 11:10 PM) *

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;
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 04:26 PM