Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
install_form.js.php
Go to the documentation of this file.
1 <?php
2 header('Content-type: text/javascript');
3 
4 ?>
5 
6 /*------------------------------------------------------------------------------
7  * End redefinition of window.alert function
8  *----------------------------------------------------------------------------*/
9 
10 function fieldInfo(id){
11  alert(info[id]);
12 }
13 
14 function testftp(form){
15 
16  postDataReturnText('installer.php','-action=testftp&-ftphost='+escape(form.ftp_host.value)+'&-ftpuser='+escape(form.ftp_username.value)+'&-ftppass='+escape(form.ftp_password.value)+'&-ftppath='+escape(form.ftp_path.value), function(result){
17  var resultDiv = document.getElementById('ftp-test-results');
18  eval('var results = '+result+';');
19  resultDiv.innerHTML = results.message;
20  });
21 
22 
23 }
24 
25 function testdb(form){
26  postDataReturnText('installer.php','-action=testdb&-dbname='+escape(form.database_name.options[form.database_name.selectedIndex].value)+'&-dbuser='+escape(form.mysql_user.value)+'&-dbpass='+escape(form.mysql_password.value), function(result){
27  var resultDiv = document.getElementById('db-test-results');
28  eval('var results = '+result+';');
29  resultDiv.innerHTML = results.message;
30  });
31 }
32 
33 
34 var listeners = {
35  'database_name' : {
36  'onchange' : function(fld){
37 
38  var option = fld.options[fld.selectedIndex].value;
39  if ( option ){
40  document.getElementById('step2').style.display='';
41  } else {
42  document.getElementById('step2').style.display='none';
43  }
44 
45  }
46  },
47  'install_type': {
48  'onchange': function(fld){
49  var option = fld.options[fld.selectedIndex].value;
50  if ( option == 'ftp_install' ){
51  document.getElementById('step4').style.display='';
52  } else {
53  document.getElementById('step4').style.display='none';
54  document.getElementById('submitstep').style.display='';
55  }
56  }
57  }
58 };
59 
60 
61 
62 
63 
64 
65