firstlogin.js
925 Bytes
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
/*
* Create the electronic signature dialog
*/
var showForm = function(){
createForm();
// create the window
this.win = new Ext.Window({
applyTo : 'firstlogin',
layout : 'fit',
width : 800,
height : 500,
closeAction :'destroy',
y : 75,
shadow: false,
modal: true
});
this.win.show();
}
var createForm = function() {
var holder = "<div id='firstlogin'></div>";
$("#wrapper").append(holder);// Append to current dashboard
var address = "setup/firstlogin/index.php";
getUrl(address, "firstlogin");
}
// Send request and update a div
var getUrl = function (address, div) {
$.ajax({
url: address,
dataType: "html",
type: "POST",
cache: false,
success: function(data) {
$("#"+div).empty();
$("#"+div).append(data);
}
});
}
$(function() { // Document is ready
showForm();
});