I got a problem in order to access the value for my radio button.
I'm developing web application system that allow user to book something.
so, i display the detail in list.But, i don't have any idea how to access the value..
this is the coding
<%@page import="java.util.*" %>
<%@page import="com.ghs.hibernate.dto.customer.*" %>
<%@page import="com.mvc.ghs.customer.action.*" %>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@page import="java.io.*" %>
<%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<html>
<head>
<title>Customer Selection</title>
<script type="text/javascript">
function openwindow(tourid)
{
childwindow=open("customer/TourMoreDetails.jsp?tourid="+tourid,"win32","height=550,width=450 scrollbar=yes");
if(childwindow.opener==null)
childwindow.opener=self;
}
</script>
</head>
<body>
<form action="customer/Preview.jsp" method="post">
<table width="60%">
<tr>
<td width="15%">Date : 02/02/2007</td>
<td width="15%">Day : Saturday</td>
<td width="15%">Origin : PJ</td>
<td width="15%">Destination : Selangor</td>
</tr>
</table>
<br>
<table border="1" width="60%">
<thead>
<tr>
<th colspan="10">Cool Tour Places</th>
</tr>
<tr>
<th>Selection</th>
<th>Tour Code</th>
<th>Tour Name</th>
<th>Duration </th>
<th>Pickup </th>
<th>Price </th>
</tr>
</thead>
<tbody>
<%
List list=(List)session.getAttribute("tourlist");
for(Iterator it=list.iterator();it.hasNext();)
{
TourDetails td=(TourDetails)it.next();
out.println("<tr>");
[B]out.println("<td><input type=radio name='choice' value="+td.getTourid()+")'></td>");[/B]
out.println("<td>");
out.println("<a href='#' onclick='openwindow("+td.getTourid()+")' >");
out.println(td.getTourcode());
out.println("</a>"+"</td>");
out.println("");
out.println("<td>"+td.getTourname()+"</td>");
out.println("<td>"+td.getDuration()+"</td>");
out.println("<td>"+td.getPickup()+"</td>");
out.println("<td>"+td.getPrice()+"</td>");
out.println("</tr>");
}
%>
<tr>
<td colspan="10" align="center"><input type="submit" value="Proceed"/></td>
</tr>
</tbody>
</table>
</form>
</body>
</html>