Disable nothing in JavaScript Feb06 '06
document.forms[0].elements[0].disabled = true;
This "grays out" a form element, essentially "locking" it, so the user can’t edit it.
But what’s the point of this, when the user can just turn off JavaScript, in the browser, and submit/edit the form as they wish??
Even though it is very handy - as a security measure, it’s probably best not to rely on this - for anything.
Categories: JavaScript ![]()
Add Feedback (view all)
Leave feedback
matthom
is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from Chicago.
Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.
Similar Entries
- JavaScript badges should reside on the bottom of the HTML page (138 recent visits)
- JavaScript: billing/shipping address copy (171 recent visits)
- JavaScript string replace for post slug (1243 recent visits)
- Using JavaScript to obtain data from HTML and XML (238 recent visits)
- JavaScript set selected on load (8887 recent visits)
- JavaScript can access hidden HTML (465 recent visits)
Stats
63 unique visits since August 2008
Recent Referrers (click)
- javascript nothing
- javascript + nothing
- set nothing in javascript
- nothing in javascript
- nothing+javascript
- javascript nothing
- javascript nothing
- javascript nothing
- javascript:nothing()
- javascript:nothing()
- javascript+set some division to nothing
- Javascript: set + nothing
- javascript set nothing
- javascript nothing
- what is nothing in javascript
- javascript nothing
- nothing en javascript
- javascript:nothing
- javascript nothing
This would certainly not be useful if you were trying to make an app more secure. For that you need to take different measures. That would be don ... Read more.