cssjs-func-lib/form.js
Sebastian Titz ab01311d89 ln
2021-11-24 15:08:48 +01:00

20 lines
615 B
JavaScript

addAutoresize = function() {
document.querySelectorAll('[data-autoresize]').forEach(function(element) {
element.style.boxSizing = 'border-box';
var offset = element.offsetHeight - element.clientHeight;
document.addEventListener('input', function(event) {
event.target.style.height = 'auto';
event.target.style.height = event.target.scrollHeight + offset + 'px';
});
element.removeAttribute('data-autoresize');
});
}
addAutoresize();
isset = function(id) {
if($('#'+id).val() == ''){
alert('Es wurden nicht alle Felder ausgefüllt.');
return false;
}
return true;
}