| | |
how to get the id in an input element?
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2008
Posts: 1
Reputation:
Solved Threads: 0
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!!!
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!!!
•
•
Join Date: Nov 2008
Posts: 3
Reputation:
Solved Threads: 1
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
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
![]() |
Similar Threads
- Using Hidden Variables in ASP.NET (ASP.NET)
- Parse a XML element with AJAX (JavaScript / DHTML / AJAX)
- Singly-Linked Lists problem (C++)
- Javascript form managment on the fly! (JavaScript / DHTML / AJAX)
- textarea Control in ASP.NET (ASP.NET)
- help with javascript and forms (PHP)
- c++ arrays, help identify element place (C++)
- Text File Input and manipulation (C++)
- Simple problem regardingform elements (ASP)
Other Threads in the JSP Forum
- Previous Thread: Java EE problem
- Next Thread: Help in javascript-jsp
| Thread Tools | Search this Thread |
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient project read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write





