<code>
<%@ page import="javax.portlet.RenderResponse,javax.portlet.RenderRequest,javax.portlet.PortletURL, javax.portlet.WindowState,java.util.*"%>
<%  System.out.println("Inside addCategory.jsp");
RenderResponse renderResponse = (RenderResponse)request.getAttribute("javax.portlet.response");
if (renderResponse == null) {
out.println ("unable to get RenderResponse object");
return;
}
RenderRequest renderRequest = (RenderRequest) request.getAttribute ("javax.portlet.request");
if (renderRequest == null) {
out.println ("unable to get RenderRequest object");
return;
}
PortletURL actionURL = renderResponse.createActionURL();
%>
<%
ArrayList clist = (ArrayList) renderRequest.getPortletSession().getAttribute("showCategory");
//out.print(clist);
%>
<tr>
<% for (int i=0; i<clist.size(); i++) {
String cid= (String) clist.get(i++);
String cname= (String) clist.get(i++);
String pid= (String) clist.get(i); %>
<tr>
<td><input type='checkbox' name='sltCheck' </td>
<td bgcolor=""><%=cid%>
</td>
<td bgcolor=""><%=cname%>
</td>
<td bgcolor=""><%=pid%>
</td>
<td>
<input type="button" name="EDIT" value="EDIT">
</td>


</tr>
<% } %>
<td><input name="submit" type="submit" value="SUBMIT" onclick="callForSubmit()" ></td>
<td align="left"><input type="button" name="Cancel" value="Cancel" onclick="javascript:history.go(-1);">&nbsp;</td>
</tr>


..........


<script>
function callForSubmit(){
document.addCategory.page.value='Category';
document.addCategory.opcode.value='AddNew';
var t = document.addCategory.sltCheck.value;
alert(t);
document.addCategory.action='<%=actionURL %>';
document.addCategory.submit();
}


</script>


</code>

I am not able to get the value into sltCheck when i checked any row.

Please help to get out of this....

THANKS IN ADVANCE

JAVA_IL

Edited 3 Years Ago by happygeek: fixed formatting

well first of all, your input tag is broken... NO closing bracket.... so it may not be recognized by the browser as a valid element...

This article has been dead for over six months. Start a new discussion instead.