<%@ Page Language="C#" AutoEventWireup="true" Codebehind="groupList.aspx.cs" Inherits="ZYDN.Web.system.USER.groupList" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>选择用户组</title>
    <link rel="stylesheet" type="text/css" href="../skins/css/main.css" />
    <link rel="stylesheet" type="text/css" href="../skins/css/Sys.css" />
    <link rel="stylesheet" type="text/css" href="css/user.css" />

    <script language="javascript" src="../js/JFramework.js"></script>

    <script language="javascript" src="../js/Sys.js"></script>

    <script language="javascript" type="text/javascript">

function ok(){
    
  var objs=$("gDiv").getElementsByTagName("input");
  var v="";
  for (var i=0;i<objs.length;i++){
        if (objs[i].type=="checkbox" & objs[i].checked){
           v=v+objs[i].value+",";
        }
        
  }
  if (v==""){
    alert("请选择用户组");
    return;
    
  }else{
     v=v.substr(0,v.length-1)
    // alert(v);
     window.returnValue= v;
	  window.close();
  }
  
}


    </script>

</head>
<body>
    <form id="form1" runat="server">
        <div style="width: 450px;height:200px; overflow:auto;" id="gDiv">
            <asp:Repeater ID="gList" runat="server">
                <ItemTemplate>
                    <div style="width: 120px; float: left; height: 25px; overflow: hidden;">
                        <input id="g<%# Eval("ID")%>" value="<%# Eval("GroupName")%>" type="checkbox" />
                        <label for="g<%# Eval("ID")%>">
                            <%# Eval("GroupName")%>
                        </label>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
           
        </div>
        <div style="width: 450px; text-align: center; clear:both;">
                <input value="确定" type="button" onclick="ok()" />
            </div>
    </form>
</body>
</html>
