This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes getting two parameters in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "getting two parameters in javascript" Watch "getting two parameters in javascript" New topic

getting two parameters in javascript

sagar shiraguppi
Ranch Hand

Joined: Jul 16, 2007
Posts: 74
<c:forEach var="trans" items="${in}">
<td><input type="checkbox" name="CheckBox" id="CheckBox" value="${tran}" onClick="selectCheckBox()"></td>
<td><fmt:formatDate value="${}" type="date" pattern="dd/MM/yyyy" /></td>
<td><cut value="${tran.ref}"/></td>
<td><cut value="${}" /></td>
<td><cut value="${trans.amountOut}" /></td>

function selectCheckBox() {

how will i get to print "${tran.ref} value in the select checkbox?? i m not gettting this/? the problem is am already printing the value of tran in the selectCheckBox(), and i need both the values in the selectCheckBox() method. Anyways i m getting to print the value of "${tran}" how to get the ${tran.ref}"??
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Please fix your code and use code tags so it is readable.

subject: getting two parameters in javascript
Similar Threads
How to get Names of selected checkboxes?
need help :: multiple rows update without primary key
Having some multidimensional array problem in JSP
JSF TreeMap Iteration Problem Using JSTL In XHTML