javascript:If(document.getElementById('troop_confirm_go') != null){
alert('true');
return true;
} else{
alert('false');
return false;
}
Is there anything wrong with this syntax? I’m trying to run it on a page but it isn’t showing either of the alerts, even if i try different pages with different buttons e.t.c. So it isn’t something wrong with the page I want to run it on. (i’m testing this through the URL bar of my browser, and have tried both chrome and firefox, both yielding the same results)
JavaScript is case-sensitive, use
if.