function checkForm(){ if (document.former.cmdbar.value== "test"){ alert ('this finally works'); } else { alert ('yay'); }You can see forms like this one on my website:
http://x.excessiveplus.netJust analyze the script by right-clicking on the page and then select 'View page source'