upon button click the id value should be validated and page should be loaded if the value is not NA or null otherwise it should throw an alert.
<a href="#" id="check" class="button" onclick="id_check()">View ID</a><br><br>
function id_check() {
if (id != "NA" || (id != null)) {
// load diff page
} else {
alert("Something Wrong");
}
}
But the if condition for or ( || ) is not working as expected. It worked fine when i just compared id != "NA". What am i missing here ?
id != nullalready hitsundefined...