/
frm_user_groups.html
87 lines (63 loc) · 2.26 KB
/
frm_user_groups.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"
>
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<title></title>
</head>
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<body dir="rtl" style="font-family: tahoma;">
<style type="text/css">
#div_userlist a{
border-color: blue;
border-style: solid;
border-width: 1px;
font-size: 11px;
font-variant: normal;
font-style: normal;
}
</style>
<script type="application/x-javascript">
$.post("py_users_related_groups_manager.py","getall=21ed",function(data)
{
var r=[];
r=data.split("dressa");
for (var i=0;i<r.length;i++) {
$("#div_userlist").append("<A><input name='checkboxes' id='a_"+r[i].split("sxww")[1]+"' type='checkbox' /><span href='#'> "+r[i].split("sxww")[0]+"-"+r[i].split("sxww")[2]+" </span> </A>");
}
});
function send_data() {
var dd=[];
var cc=[];
var chkitems="";
var pkname="";
dd = document.getElementsByName("checkboxes");
for (var i=0; i<dd.length; i++) {
if (dd[i].checked) {
cc.push(dd[i].id.split("_")[1]);
}
}
if (cc.length !=0) {
pkname=document.getElementById("txt_group_title").value;
for (var bv=0;bv<cc.length;bv++) {
if (bv==0) {
chkitems=cc[bv];
} else
{
chkitems=chkitems+"gfhjdg"+cc[bv];
}
}
$.post("py_users_related_groups_manager.py","name="+pkname+"&"+"ar="+chkitems,function(data){
alert(data);
});
}
}
</script>
<div id="div_userlist">
نام گروه : <input type="text" id="txt_group_title"/>
<a href="#" onclick="send_data()">تائید</a>
<br>
</div>
</body>
</html>