data = "<p>Please enter your username and password to login.</p>";
data += "<p><span class=\"txtLabel\">Username:</span><span id=\"txtUsername\"></span></p>";
data += "<p><span class=\"txtLabel\">Password:</span><span id=\"txtPassword\"></span></p>";
data += "<p class=\"pButton\"><span id=\"btnLogin\"></span></p>";
displayDialogBox(1, data, "Login", 300);
txtPassword.refresh();
txtUsername.refresh();
btnLogin.refresh();
txtUsername.focus();
txtPassword.setControlText("");
<script>
var data = "<p>Please enter your username and password to login.</p>";
data += "<p><span class=\"txtLabel\">Username:</span>";
data += "<span id=\"txtUsername\"></span></p>";
data += "<p><span class=\"txtLabel\">Password:</span>";
data += "<span id=\"txtPassword\"></span></p>";
data += "<p class=\"pButton\"><span id=\"btnLogin\"></span></p>";
data += "<p class=\"pButton\"><span id=\"btnLoginAG\"></span></p>";
function displayDialogBox(firstParam, BodySpans , Size){
document.write(BodySpans);
}
displayDialogBox(1, data, "Login", 300);
var txtUsername = new AW.UI.Input;
txtUsername.setId('txtUsername');
var txtPassword = new AW.UI.Input;
txtPassword.setId('txtPassword');
var btnLogin = new AW.UI.Button;
btnLogin.setId('btnLogin');
btnLogin.setControlText("OK");
btnLogin.onControlClicked = function(){
txtUsername.setStyle('display','none')
txtPassword.setStyle('display','none')
this.setStyle('display','none')
btnLoginAgain.setStyle('display','block')
}
var btnLoginAgain = new AW.UI.Button;
btnLoginAgain.setId('btnLoginAG');
btnLoginAgain.setControlText("Login");
btnLoginAgain.setStyle('display','none');
btnLoginAgain.onControlClicked = function(){
txtUsername.setStyle('display','block')
txtPassword.setStyle('display','block')
btnLogin.setStyle('display','block')
this.setStyle('display','none')
}
txtUsername.refresh();
txtPassword.refresh();
btnLogin.refresh();
txtUsername.focus();
txtPassword.setControlText("");
</script>
This topic is archived.