?
Solved

Prevent form field from being modified

Posted on 1997-07-09
1
Medium Priority
?
240 Views
Last Modified: 2006-11-17
I'm relatively new to Javascript, and I've managed to create a "calculator". The thing though is that the only method I know of to display results is in a TEXT field in a FORM. My problem is that it is possible for the user to go into these text fields and edit the results (for whatever reason) and may cause some confusion. So I would like to know if there is a way to prevent the field from being modified (no, not willing to do something like send the values to the fields every half a second). If not, then is there any other way to display answers in an object other than a text field in a form?? If you would like clarification of what I'm talking about look at it at: http://courses.bus.ualberta.ca/mgtsc352/2_5_clc6.htm 
The only thing the user is supposed to modify is the field beside "SMOOTH".  Thank you!
0
Comment
Question by:leekk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
icd earned 280 total points
ID: 1268395
Change each of the input boxes that you calculate to (for example)

<td><input type="text" name="f2" size=4 OnBlur="compute(this.form)"></td>

Then as soon as the cursor is moved off the field any changes are recomputed.

Of course it will not change it back until the cursor moves off the field but then no other solution will either.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question