Xataface 2.0
Xataface Application Framework
install/install_form.js.php
Go to the documentation of this file.
00001 <?php
00002 header('Content-type: text/javascript');
00003 
00004 ?>
00005 
00006 /*------------------------------------------------------------------------------
00007  * End redefinition of window.alert function
00008  *----------------------------------------------------------------------------*/
00009 
00010 function fieldInfo(id){
00011         alert(info[id]);
00012 }
00013 
00014 function testftp(form){
00015         
00016         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){
00017                 var resultDiv = document.getElementById('ftp-test-results');
00018                 eval('var results = '+result+';');
00019                 resultDiv.innerHTML = results.message;
00020                 });
00021         
00022 
00023 }
00024 
00025 function testdb(form){
00026         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){
00027                 var resultDiv = document.getElementById('db-test-results');
00028                 eval('var results = '+result+';');
00029                 resultDiv.innerHTML = results.message;
00030         });
00031 }
00032 
00033 
00034 var listeners = {
00035         'database_name' : {
00036                 'onchange' : function(fld){
00037                         
00038                         var option = fld.options[fld.selectedIndex].value;
00039                         if ( option ){
00040                                 document.getElementById('step2').style.display='';
00041                         } else {
00042                                 document.getElementById('step2').style.display='none';
00043                         }
00044                 
00045                 }
00046         },
00047         'install_type': {
00048                 'onchange': function(fld){
00049                         var option = fld.options[fld.selectedIndex].value;
00050                         if ( option == 'ftp_install' ){
00051                                 document.getElementById('step4').style.display='';
00052                         } else {
00053                                 document.getElementById('step4').style.display='none';
00054                                 document.getElementById('submitstep').style.display='';
00055                         }
00056                 }
00057         }
00058 };
00059 
00060         
00061 
00062 
00063         
00064         
00065         
 All Data Structures Namespaces Files Functions Variables Enumerations