how to get the id in an input element?

Reply

Join Date: Nov 2008
Posts: 1
Reputation: zheen is an unknown quantity at this point 
Solved Threads: 0
zheen zheen is offline Offline
Newbie Poster

how to get the id in an input element?

 
0
  #1
Nov 11th, 2008
hi! im new here, just a newbie programmer, asking a newbie question.. ^_^

out.println("<td>" + "<input type=\"submit\" id=\"" + patientNum2.get(counterQueue) + "\" value=\"" + patientNum2.get(counterQueue) + "\" name=\"btnShowCaseList\" />" + "</td>");

how could i get the value of "id" from the jsp page to the servlet?, the only thing i know is getting the "value" which is request.getParameter(btnShowCaseList), is there a counterpart for getting the "id"? thanks in advance!!!
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 3
Reputation: shurdsfield is an unknown quantity at this point 
Solved Threads: 1
shurdsfield shurdsfield is offline Offline
Newbie Poster

Re: how to get the id in an input element?

 
0
  #2
Nov 17th, 2008
No. Only the name and value are submitted in a request. Not sure why you would want the id anyway. The id is usually only used to identify the control in javascript.

You should probably ask what you are trying to do. if you want to pass extra information create a hidden field and use that to store the patientNum2.get(counterQueue) value
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC