25 lines
695 B
JavaScript
25 lines
695 B
JavaScript
function growTextarea(name) {
|
|
var el=document.getElementById(name);
|
|
var rows=el.value.split(/\r?\n|\r/);
|
|
el.rows=rows.length+1;
|
|
var cols=40;
|
|
for (var i = 0, row; row = rows[i]; i++) {
|
|
cols=Math.max(cols, row.length);
|
|
}
|
|
el.cols=cols;
|
|
}
|
|
|
|
function reload() {
|
|
location.href=window.location.href;
|
|
}
|
|
|
|
function hidetoggle(name,button) {
|
|
document.getElementById(name).style.display='none';
|
|
document.getElementById(button).onclick=function(){showtoggle(name,button);};
|
|
}
|
|
function showtoggle(name,button) {
|
|
document.getElementById(name).style.display='inline-block';
|
|
document.getElementById(button).onclick=function(){hidetoggle(name,button);};
|
|
}
|
|
|