Fórum

input radio issue

thumbnail
Jose Alvarez de Lara, modificado 11 Anos atrás.

input radio issue

Junior Member Postagens: 45 Data de Entrada: 10/12/12 Postagens Recentes
Hi,

I have a jsp file with two radio buttons. Here is my code,


	<table>
		<tbody><tr><td align="left"><b>To:</b></td></tr>
		<tr><td align="center">
			<label for="types1">
				<input type="radio" name="to" id="types1" value="orange" checked> Orange
			</label>
			<label for="types2">
				<input type="radio" name="to" id="types2" value="red"> Red
			</label>
			<!--
        	<aui:input inlineField="true" name="to" inlineLabel="right" label="Orange"
        		type="radio" value="orange" checked="<%= true %>" />
        	<aui:input inlineField="true" name="to" inlineLabel="right" label="Red"
        		type="radio" value="red" />
        	-->
        </td></tr>
    </tbody></table>


and I get always a null value. And if I try the comment code I get null as well.

What is it going wrong? How can I do this?

Best reagads,
Jose
thumbnail
Subhash Pavuskar, modificado 11 Anos atrás.

RE: input radio issue

Regular Member Postagens: 234 Data de Entrada: 13/03/12 Postagens Recentes
Hi ,

I have a doubt did you declared inside the <form> tag if yes then pls paste complete snippet !!
thumbnail
Jose Alvarez de Lara, modificado 11 Anos atrás.

RE: input radio issue

Junior Member Postagens: 45 Data de Entrada: 10/12/12 Postagens Recentes
Here is the complete snippet form,


<aui:form name="fm" method="POST" action="<%= updateBoxURL.toString() %>" onsubmit="<%= updateBoxURL.toString() %>">
	<aui:input type="hidden" name="redirectURL" value="<%= renderResponse.createRenderURL().toString() %>" />
	<aui:input type="hidden" name="boxId" value="<%= String.valueOf(box.getId()) %>" />
	<b>From:</b> blue
	<br>
	<table>
		<tbody><tr><td align="left"><b>To:</b></td></tr>
		<tr><td align="center">
			<label for="types1">
				<input type="radio" name="to" id="types1" value="orange" checked> Orange
			</label>
			<label for="types2">
				<input type="radio" name="to" id="types2" value="red"> Red
			</label>
			<!--
        	<aui:input inlineField="true" name="to" inlineLabel="right" label="Orange"
        		type="radio" value="orange" checked="<%= true %>" />
        	<aui:input inlineField="true" name="to" inlineLabel="right" label="Red"
        		type="radio" value="red" />
        	-->
        </td></tr>
    </tbody></table>
	<aui:input name="message" label="Box Message" value="" />
	<br>
	<aui:button type="submit" value="Save" />
</aui:form>


Thanks a lot for your reply!!!

Regards,
Jose
thumbnail
Jose Alvarez de Lara, modificado 11 Anos atrás.

RE: input radio issue

Junior Member Postagens: 45 Data de Entrada: 10/12/12 Postagens Recentes
Hi,

It is an error of mine. I have not tested my Service class and I have a sql error. emoticon
I am going to work it out.

Regards,
Jose