Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting value in servlet  RSS feed

 
Ratan Pawar
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am creating a dyanamic table in jsp using javascript and appending the input form element into table cell but in table cell i am diaplaying name using innerHTML.For this i wrote the following code.
Now i want the value of input element elUnit into servlet.
i tried it using type input also but it gives null.

what should i do?


[ June 11, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to reference the parameter by the name that you give to the element.
 
Ratan Pawar
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
You need to reference the parameter by the name that you give to the element.


yes i am gave referance parameter to element. opotionid is the rownumber
and in servlet i gave as itemunit_j which is as element name.
in servlet i used for loop to getting the values of all element which append into table.
but i enable to get the value of element into servlet.
when i remove cellUnit.innerHTML from jsp code then i get value of input element into servlet but i want to use innerHTML.
 
Ratan Pawar
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir,
Problem is solved.
i put innerHTML property before append to table.
it works.
Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!