I am new to Liferay development and working on migration of portlets from 6.1 to 6.2. There am facing a strange behavior of a portlet which is having 3 tabs and each tab is to be displayed on clicking a radio button(as there are 3 radio buttons for 3 tabs) and at a time one tab is to be displayed on click.
here, is my code:
<table cellspacing="0" cellpadding="0" align="center">
<tr>
<td><input type="radio" name="select" id="<portlet:namespace/>inRadio" checked="true" tabindex="1"/></td>
<th> <%= resourceBundle.getString("In_Documents") %> </th>
<td> <input type="radio" name="select" id="<portlet:namespace/>busRadio" checked="false" tabindex="2"/></td>
<th> <%= resourceBundle.getString("Bus_Documents") %> </th>
<td> <input type="radio" name="select" id="<portlet:namespace/>outRadio" checked="false" tabindex="3"/></td>
<th> <%= resourceBundle.getString("Out_Documents") %> </th>
</tr>
</table>
and my jquery code is:
$(document).on("click","#<portlet:namespace/>outRadio,#<portlet:namespace/>busRadio,#<portlet:namespace/>inRadio",function(e){
$("#<portlet:namespace/>intabID").hide();
$("#<portlet:namespace/>bustabID").hide();
$("#<portlet:namespace/>outtabID").hide();
var eventTargetId = $(this).attr("id");
if(eventTargetId=="<portlet:namespace/>outRadio"){
$("#<portlet:namespace/>outtabID").show();
}else if(eventTargetId=="<portlet:namespace/>busRadio"){
$("#<portlet:namespace/>bustabID").show();
}else{ // <portlet:namespace/>inRadio
$("#<portlet:namespace/>intabID").show();
}
});
I tried by applying normal javascript event style on the html input tags, but that is also not working.
could you help me on this, why is it not working or any way to handle this better in Liferay 6.2. Thanks in advance.