susee
08-21-2007, 04:54 AM
:confused: If i select a value from dropdown list then the corresponding check box should be checked...for this i have to compare the checkbox value with array value...how to do this.
this is my javascript code.Pls help me...........
function SelRole()
{
var r
var n,p,q,a,k,len
var table = new Array()
var Arr = new Array()
var Arr1,Arr2,Arr3,j,Flag
var Flag
Flag='N'
q = <%=RCount%>;
r = <%=UserCount%>;
<%For n = 0 to RCount -1 %>
<%Response.write("table["&n&"] = frmAddress.hiduserid"&n&".value")%>
//alert(table[2])
<%next%>
<%For p = 0 to UserCount -1 %>
<%Response.write("Arr["&p&"] = frmAddress.hidnewuserid"&p&".value")%>
//alert(Arr[0])
<%next%>
<%For p = 0 to UserCount -1 %>
alert(Arr[p])
<%For n = 0 to RCount -1 %>
//alert(table[n])
if(frmAddress.chkUID<%=p%>.value == Arr[p]){
frmAddress.chkUID<%=p%>.checked = true;
}
else{
return false;
}
<%Next%>
<%Next%>
}
this is my javascript code.Pls help me...........
function SelRole()
{
var r
var n,p,q,a,k,len
var table = new Array()
var Arr = new Array()
var Arr1,Arr2,Arr3,j,Flag
var Flag
Flag='N'
q = <%=RCount%>;
r = <%=UserCount%>;
<%For n = 0 to RCount -1 %>
<%Response.write("table["&n&"] = frmAddress.hiduserid"&n&".value")%>
//alert(table[2])
<%next%>
<%For p = 0 to UserCount -1 %>
<%Response.write("Arr["&p&"] = frmAddress.hidnewuserid"&p&".value")%>
//alert(Arr[0])
<%next%>
<%For p = 0 to UserCount -1 %>
alert(Arr[p])
<%For n = 0 to RCount -1 %>
//alert(table[n])
if(frmAddress.chkUID<%=p%>.value == Arr[p]){
frmAddress.chkUID<%=p%>.checked = true;
}
else{
return false;
}
<%Next%>
<%Next%>
}