/** * On mouseover change the password input to text and change back * * @type {HTMLElement} */ let snapForm = document.getElementById('tabs'); if (snapForm) { /* * Find all input fields in 'tabs' div. */ let inputs = snapForm.getElementsByTagName('input'); for (let i=0; iAPI Key ist leer.'); return; } let url = 'index.php?module=sipgate&action=apicheck'; resultField .attr('class', '') .html('Lädt ...'); $.post(url, {key: key}) .done(function(msg, status, xhr){ console.log(msg, status, xhr); console.warn(msg.key); console.warn(msg.class); if (msg.key && msg.class) { resultField.append('' + msg.key + ''); resultField .attr('class', msg.class) .html(msg.key); } else { resultField .attr('class', 'api_fail') .html('Server Fehler'); } }) .fail(function(xhr, status, error) { resultField .attr('class', 'api_fail') .html('Der Test schlug fehl.'); console.error(status, error, xhr); }); }); function call(id, dummy) { $.ajax({ url: 'index.php?module=sipgate&action=call&id='+id, type: 'POST', dataType: 'json', data: {}, success: function(data) { if(data) { } } }); }