I've written the following code to trigger when the button with the ID "usrsubmit" it clicked. It doesn't seen to be working, however.
Code:
function usernamef() {
var usrName = document.getElementById('username');
usrSubmit = document.getElementById('usrsubmit');
usrSubmit.onclick = function() {
if(usrName.value == "") {
alert('You must select your name before continuing.');
} else {
pOff('p1');
pOn('p2');
}
}
}
window.onload = usernamef();
Any ideas anyone?