function ajaxFunction(fieldId, fieldType){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ // document.myForm.time.value = ajaxRequest.responseText; }else { status.style.display = 'block'; status.innerHTML = " Loading..."; } } // alert ('Code OBEJS25'); // var fieldid = document.getElementById('').value; if (fieldType == 'rating') { var url = fieldId.split("?id="); lineId = url[1]; var queryString = "?id=" + lineId ajaxRequest.open("GET", "/ajax/update_rating_field.php" + queryString, true); } else if (fieldType == 'checkbox') { var content = document.getElementById('f_' + fieldId).checked; if (content) { content = "true"; } else { content = ""; } var queryString = "?id=" + fieldId + "&content=" + encodeURIComponent(content); ajaxRequest.open("GET", "/ajax/update_checkbox_field.php" + queryString, true); } else if (fieldType == 'main') { var content = document.getElementById('fbinput'+fieldId).value; var queryString = "?id=" + fieldId + "&content=" + encodeURIComponent(content); ajaxRequest.open("GET", "/ajax/update_field.php" + queryString, true); } else { var content = document.getElementById(fieldId).value; var queryString = "?id=" + fieldId + "&content=" + encodeURIComponent(content); ajaxRequest.open("GET", "/ajax/update_field.php" + queryString, true); } ajaxRequest.send(null); } function ajaxMoveColumn (listfieldId, start, target) { // alert ('Status: ' + target); // alert ("Status: " + listfieldId + "\nStart: " | start + "\nTarget: " + target); var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ // document.myForm.time.value = ajaxRequest.responseText; } } // alert ('Code OBEJS25'); // var fieldid = document.getElementById('').value; var queryString = "?id=" + listfieldId + "&s=" + start + "&t=" + target; ajaxRequest.open("GET", "/ajax/edit_listfield_column_move.php" + queryString, true); ajaxRequest.send(null); }