Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
part 1
<HTML><HEAD> <TITLE>Account authorization</TITLE> <SCRIPT LANGUAGE="JAVASCRIPT"> function validateFormData() { var message = ""; if (document.AccountForm.Name.value.length == 0) { message = message + "Name field cannot be left blank!\n"; } if (document.AccountForm.Password.value.length < 8) { message = message + "Password needs to be atleast 8 chars!\n"; } if (document.AccountForm.Trans.checked == true) { if (document.AccountForm.TransPwd.value.length < 4) { message = message + "Trans pwd needs to be atleast 4 chars!\n"; } } if ( message.length > 0 ) { alert( message ); return false; } else { return true; } }
Assignment
Modify above example to take: Name of the borrower Book number Account number of borrower, if available: use checkbox and input field