• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML Text Filed values

 
Prerna
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i pass html text field values from a form without letting the values of the text field changed also .. show it as disabled text field... but access its value for some validation checks
 
Randall Twede
Ranch Hand
Posts: 4363
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prerna,
I dont know the answer sorry.
I hate to say this but, your name does not comply with the Javaranch naming guidelines which can be found at http://www.javaranch.com/name.jsp
please register again with a valid name.
 
Mohamed Yousuff
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

use the readonly property to the html tag like this <input type=text value='javaranch' readonly style='background:gray'>
If you want to show it as disabled, use stylesheet as shown above.
Hope you understand the solution

Originally posted by Prerna:
how do i pass html text field values from a form without letting the values of the text field changed also .. show it as disabled text field... but access its value for some validation checks


------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic