<!-- ########## Start use this portion for iterator fieled unselect BY RZ ########## -->
var displayId=document.getElementById('displayId').value;
alert("displayId"+displayId);
var unselectValue='detailsId'+displayId;
document.getElementById(unselectValue).style.background='none';
<!-- ########## End use this portion for iterator fieled unselect BY RZ ########## -->
<script><!--
function rowSelected(divId,doUncheck){
document.getElementById(doUncheck).checked = false;
alert("divId_"+divId);
var displayId=document.getElementById('displayId').value;
alert("displayId"+displayId);
var unselectValue='detailsId'+displayId;
alert("unselectValue_"+unselectValue);
document.getElementById('displayId').value=divId;
var divIdplusValue='detailsId'+divId;
alert("divIdplusValue_"+divIdplusValue);
if(displayId!=null && displayId!=divId){ // not appropiate displayId!=''
alert("if_1");
document.getElementById(divIdplusValue).style.background='#FFDFDD';
alert("if_2");
document.getElementById(unselectValue).style.background='none';
alert("if_3");
}else{
alert("else");
//document.getElementById(unselectValue).style.background='#FFDFDD';
//document.getElementById('displayId').value=divId;
alert("elseL");
}
}
--></script>
In Jsp page :
<div id="mainRight_div" style="float:left;width:330px;height:230px;overflow:auto;overflow-x:scroll;overflow-y:scroll;margin-left:2px;">
<div id="c_h_div" style="float:left;text-align:center;width:auto;height:auto;background-color:#FFFFFF;border-bottom:1px solid #CCCCCC;">
<table id="parentDiv_Dependency" width="100%" border="0" cellpadding="0" cellspacing="0" class="hovertable" style="width:850px;">
<tr align="center" style="font-family:SolaimanLipi;font-size:14px;font-weight:bold;color:#000; background-color:none;">
<td width="5%">ক্র.<br/>
নং</td>
<td width="12%">নাম</td>
<td width="9%">সম্পর্ক </td>
<td width="9%">জন্ম তারিখ</td>
<td width="14%" style="background:none; ">বয়স</td>
<td width="14%">প্রতিবন্ধীর ধরন</td>
<td width="16%">বৈবাহিক অবস্হা </td>
<td width="14%">ছবি</td>
</tr>
<s:if test='%{opRelationRegistrationList.size>0}'>
<%int i=0;
String a="";
%>
<% int j=0; %><!-- For row color by RZ -->
<s:iterator value="opRelationRegistrationList" status="status">
<% j+=1;%><!-- For row color by RZ -->
<%i++;
if(i==1){
a="১";
}else if(i==2){
a="২";
}
else if(i==3){
a="৩";
}else if(i==4){
a="৪";
}else if(i==5){
a="৫";
}else if(i==6){
a="৬";
}else if(i==7){
a="৭";
}else if(i==8){
a="৮";
}else if(i==9){
a="৯";
}else if(i==10){
a="১০";
}
%>
<input type="hidden" id="displayId" name="displayId" value=""/> <!-- Learn why hidden field is need-->
<tr id="detailsId<%=j %>" > <!-- -rowSelected by me-->
<td width="5%" style="font-family:SolaimanLipi;text-align:center; font-size:14px;color:#000;" ><%=a %></td>
<td width="12%" style="font-family:Arial; font-size:12px; font-weight:normal; color:#000;"><input type="hidden" id="regNo" name="regNo" value="<s:property value='rPRegNo'/>"/>
<a href="#" style="text-decoration:none" onclick="dependentValShow('<s:property value='rPRegNo'/>','dob','<%=j %>','self_id','pDependent','infantC')">
<s:property value='rPName'/>
</a></td>
<td width="7%" style="font-family:SolaimanLipi;text-align:center; font-size:14px;color:#000;"><s:if test='%{rPrel_id==1}'> পিতা </s:if>
<s:elseif test='%{rPrel_id==2}'> মাতা</s:elseif>
<s:elseif test='%{rPrel_id==3}'> পুত্র</s:elseif>
<s:elseif test='%{rPrel_id==4}'> কন্যা</s:elseif>
<s:elseif test='%{rPrel_id==5}'> স্ত্রী</s:elseif>
<s:elseif test='%{rPrel_id==6}'> স্বামী</s:elseif></td>
<td width="9%" style="font-family:Arial; font-size:12px; font-weight:normal; color:#000;"><s:date name='rPDob' format='dd/MM/yyyy'/></td>
<td width="18%" style="text-align:center;font-family:Arial; font-size:12px; font-weight:normal; color:#000;"><s:property value='hrvPoliceInfo.age'/></td>
<td width="14%"> </td>
<td width="16%"> </td>
<td width="14%"> </td>
</tr>
</s:iterator>
</s:if>
<s:else>
<tr>
<td colspan="8" align="center" style="color:#FF0000;">কোন ডাটা পাওয়া যায় নাই </td>
</tr>
</s:else>
</table>
</div>
</div>
No comments:
Post a Comment