/** * This function populates the server property boxes with the selected server's info **/ function showProperties() { // initialize vars counter = 0; szSelectedServers = ""; // update the properties boxes with the correct information for (i=0; i 1 then clear if ( counter > 1 ) { document.forms[0].szName.value = ""; document.forms[0].szURL.value = ""; document.forms[0].szComment.value = ""; document.forms[0].szServerId.value = ""; document.forms[0].szFileStatus.value = ""; } // return return; } /** * This function processes the individual commands **/ function processCommand( szCommand ) { // validate name and url if ( szCommand == "ADD" || szCommand == "UPDATE" ) { // namd and URL must be set //if ( document.forms[0].szName.value == "" || // document.forms[0].szURL.value == "" ) //{ // give message // alert ( "Please enter a value in both the 'Name' and 'URL' fields." ); // return; //} if ( document.forms[0].szURL.value == "" ) { alert( "Please enter a value for the URL field" ); return; } } // calculate the center if (document.all) var xMax = screen.width, yMax = screen.height; else if (document.layers) var xMax = window.outerWidth, yMax = window.outerHeight; else var xMax = 640, yMax=480; var xOffset = (xMax - 350)/2, yOffset = (yMax - 150)/2; // load the processing page window.open('/chameleon/common/phpwms/blank.html','waitwindow','resizable=no,width=350,height=150,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+''); // process individual commands if ( szCommand == "UPDATE" && document.forms[0].szServerId.value == "" ) { // give message alert ( "No server selected to update." ); return; } // set the command variable document.forms[0].szCommand.value = szCommand; // return return; } /** * This function does some last minute things before submitting the form **/ function submitForm() { // clear the status box so it doesn't clutter the URL document.forms[0].szStatus.value = ""; // submit the form document.forms[0].submit(); // return return; }