Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can u disable a text field

Status
Not open for further replies.

hemuravi

Programmer
Jul 15, 2003
2
IN
Hi,

I am new to html and javascript...my html page has some text fields.once the user enters the fields and presses submit,the next page should have the entered text fields containing data to be disabled,so that the user can no longer modify them and the page should have additional fields...can u tell me some way to do this...an example demonstrating the above would be helpful.hope somebody could guide me to some in depth javascript resources on web.

Regards,
Hemu
 
Something like this:

document.getElementById("textFieldId").dissabled="on";

Or... it might be ="true" (sorry, didn't check)

I prefer to use ID= instead of of NAME= for these kinds of tasks because it just seems infinately more reliable.
 
yes, use "true" or "disabled"

and disabled has one "s":

document.getElementById("textFieldId").disabled="disabled";



=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top