this Script cause freeze
.
<input type="button" onClick="onClickHandler();" />
.
function onClickHandler(){
var form = document.getElementById("form");
if(form){
var textarea1 = document.getElementById('textarea1');
if(textarea1){
if(textarea1.style.color.match(/170/)){
textarea1.value = "";
}else{
textarea1.style.color = "#fff";
textarea1.value = Base64.encode(textarea1.value);
}
}
var textarea2 = document.getElementById('textarea2');
if(textarea2){
if(textarea2.style.color.match(/170/)){
textarea2.value = "";
}else{
textarea2.style.color = "#fff";
textarea2.value = Base64.encode(textarea1.value);
}
}
var input1 = document.getElementById('input1');
if(input1.style.color.match(/170/)){
input1.value = "";
}
form.submit();
form.setAttribute('id','form_after');
}
return false;
}
What's wrong?