I have this code
var txt;
function change(){
txt = "@Utils.GeneratePass()";
document.getElementById("password_field").value = txt;
}
function changeToHash(txt){
alert(window.txt);
var password = "@Utils.Hash(txt)";
document.getElementById("password_field").value = password;
}
In method @Utils.Hash i need pass one string, and i want put the value of txt. But i got the error "The name 'txt' does not exist in the current context.