• Post Reply Bookmark Topic Watch Topic
  • New Topic

TextBox Value  RSS feed

 
Tammy Easterby
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Can somebody please tell me how to get the value that a user entered into a textbox that happens to be inside a datatable? Usually in JSP/HTML you'd go document.forms[0].someElement.value. What is it in JSF?

Thank you!
 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please can you post your code
 
Tammy Easterby
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answered my own question.
You have to do this (for those who are interested):
document.getElementById("formName:tableN:indexN:elementBlah").value

Thanks.
 
Kumar Saravanan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tammy,

Do you need to access the value (entered in textfield) from the javascript or from the java code?

Thanks,
Kumaran Saravanan
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!