View Full Version : How can we compare checkbox value with set of array values....

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
q = <%=RCount%>;
r = <%=UserCount%>;

<%For n = 0 to RCount -1 %>
<%Response.write("table["&n&"] = frmAddress.hiduserid"&n&".value")%>

<%For p = 0 to UserCount -1 %>
<%Response.write("Arr["&p&"] = frmAddress.hidnewuserid"&p&".value")%>

<%For p = 0 to UserCount -1 %>
<%For n = 0 to RCount -1 %>
if(frmAddress.chkUID<%=p%>.value == Arr[p]){
frmAddress.chkUID<%=p%>.checked = true;
return false;


08-21-2007, 10:28 AM
Could you post how this code looks AFTER the server side code has runs? I.e. the code that the browser is actually going to be trying to run?