[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Prevent form field from being modified

Posted on 1997-07-09
1
Medium Priority
?
241 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

Technology Partners: 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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
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…

656 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