apologies for ninja edit, did something stupid while attempting to fix it and didn't notice.
Basically I have a simple javascript function that I want to check the value of a textbox and if it differs from another textbox, to come up with a warning.
The error is:
SCRIPT5007: Unable to get value of the property 'value': object is null or undefined
ManageAgencyAgents.aspx, line 660 character 13 - this refers to the inpLoginID line but I figure its going to complain about all of my documentgetelementbyIds
The code is:
Basically I have a simple javascript function that I want to check the value of a textbox and if it differs from another textbox, to come up with a warning.
The error is:
SCRIPT5007: Unable to get value of the property 'value': object is null or undefined
ManageAgencyAgents.aspx, line 660 character 13 - this refers to the inpLoginID line but I figure its going to complain about all of my documentgetelementbyIds
The code is:
Code:
function checkForUsernameChange() {
if (document.getElementById('inpLoginID').value != 0) {
var txtUsername = document.getElementById('txtUsername').value;
var inpUsername = document.getElementById('inpUsername').value;
if (inpUsername != txtUsername) {
var answer = confirm("Are you sure you wish to change this name, the user " + inpUsername + " will be deleted from the system");
if (answer) {
return;
}
else {
document.getElementById('txtUsername').value = inpUsername;
}
}
}
return;
}
Last edited: