Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio Button, JSP and HostPublisher

Status
Not open for further replies.

dnguyen

Programmer
Apr 16, 2001
11
AU
Hi All,

I have just started to use and develop some sample "Proof of Concepts" with Host Publisher.

Unfortunately, I don't know much about JSP and have a situation I hope someone can assist.

The situation is, RADIO buttons, I have an input page which the user can enter a "NAME" value to search for, and the resultant output is a table list for all matching names, each having a radio button.

Here are the sample codes for each page,

FORM - TI0060_Policy_Selection

<HTML>
<%@ content_type=&quot;text/html;charset=ISO-8859-1&quot; %>
<BODY>

<BEAN NAME=&quot;Main_Menu&quot; TYPE=&quot;IntegrationObject.Main_Menu&quot; INTROSPECT=&quot;yes&quot; CREATE=&quot;yes&quot; SCOPE=&quot;request&quot;>
</BEAN>
<% Main_Menu.doHPTransaction(request, response); %>

<FORM NAME=&quot;TI0060_Name_Search_List&quot; METHOD=&quot;POST&quot; ACTION=&quot;<%= response.encodeUrl(&quot;TI0060_Name_Search_List.jsp&quot;) %>&quot;>

<P>Name Search
<INPUT TYPE =&quot;text&quot; NAME=&quot;ti0060_name_search&quot;>
<P><INPUT TYPE=&quot;submit&quot; VALUE=&quot;Search&quot;>
</FORM>
</BODY>
<% out.close(); %>
</HTML>

FORM - TI0060_Name_Search_List

<HTML>
<%@ content_type=&quot;text/html;charset=ISO-8859-1&quot; %>
<BODY>

<BEAN NAME=&quot;TI0060_Name_Search&quot; TYPE=&quot;IntegrationObject.TI0060_Name_Search&quot; INTROSPECT=&quot;yes&quot; CREATE=&quot;yes&quot; SCOPE=&quot;request&quot;>
</BEAN>
<% TI0060_Name_Search.doHPTransaction(request, response); %>

<P>TI0060 Name Search List<TABLE BORDER><TBODY>
<tr>
<th>Description</th>
<th>Number</th>
<th>Status</th>
</tr>
<% int position = 1; %>
<REPEAT INDEX=idx1><tr>
<td><INPUT TYPE=&quot;radio&quot; name=&quot;TI0060_Name_Search_List&quot; value=<%= position++ %>><INSERT BEAN =TI0060_Name_Search PROPERTY =ti0060_name_search_listcolumn0></INSERT></td>
<td><INSERT BEAN =TI0060_Name_Search PROPERTY =ti0060_name_search_listcolumn1></INSERT></td>
<td><INSERT BEAN =TI0060_Name_Search PROPERTY =ti0060_name_search_listcolumn2></INSERT></td>
</tr>
</REPEAT>
</TBODY>
</TABLE>

<FORM NAME=&quot;TI4009_Policy_Display_Name&quot; METHOD=&quot;POST&quot; ACTION=&quot;<%= response.encodeUrl(&quot;TI4009_Policy_Display_Name.jsp&quot;) %>&quot;>

<P><INPUT TYPE=&quot;submit&quot; VALUE=&quot;Select&quot;>
</FORM>

</BODY>
<% out.close(); %>
</HTML>


You will notice above, I have created a variable, &quot;position&quot;, and assigned this value to each name found, together with a radio button.

The QUESTION here is, if a user selects a particular name, ie. selects the associated RADIO button, and clicks on the &quot;Select&quot; button.

How do I pass this value to the next page, so I could perform some more coding.

Here is the code for the last page.

FORM - TI4009_Policy_Display_Name

<HTML>
<%@ content_type=&quot;text/html;charset=ISO-8859-1&quot; %>
<BODY>

<BEAN NAME=&quot;TI0021_Buyer_Name_Select&quot; TYPE=&quot;IntegrationObject.TI0021_Buyer_Name_Select&quot; INTROSPECT=&quot;yes&quot; CREATE=&quot;yes&quot; SCOPE=&quot;request&quot;>
</BEAN>
<% TI0021_Buyer_Name_Select.doHPTransaction(request, response); %>

<P>T4011_2 Policy Display<INSERT BEAN=TI0021_Buyer_Name_Select PROPERTY=ti4011_2_buyer_display_details ></INSERT>
</BODY>
<% out.close(); %>
</HTML>


Any assistance would be much appreciated.

Thanks.
 
The radio buttons need to be in a Form object to be passed as parameters to the next page. As far as the technique on how to retrieve these... well I just did a post on something very similar a couple days ago. Here is the link to that thread: thread695-128191. If you have any questions, write back. Wushutwist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top