function clearInput(element) { if (element.value == element.defaultValue) { element.value = ""; return true; } else { return false; } } function revalueInput(element) { if (element.value == "") { element.value = element.defaultValue; return true; } else { return false; } } /* Kopiert aus phpMyAdmin: confirmLink*/ /** * Displays an confirmation box before to submit a "DROP/DELETE/ALTER" query. * This function is called while clicking links * * @param object the link * @param object the sql query to submit * * @return boolean whether to run the query or not */ function confirmDelete(theLink, MachineInfo) { var is_confirmed = confirm("Wollen Sie die Maschine " + '\n' + MachineInfo + '\n' + "wirklich löschen?"); if (is_confirmed) { if ( typeof(theLink.href) != 'undefined' ) { theLink.href += '&is_js_confirmed=1'; } else if ( typeof(theLink.form) != 'undefined' ) { theLink.form.action += '?is_js_confirmed=1'; } } return is_confirmed; } // end of the 'confirmLink()' function