Jump to content

Am I using false the correct way?


Noongar

Recommended Posts

Does anyone know why I am not getting an alert on an empty form INPUT value?

 

if (document.forms["form"]["targetname"].value == "" && document.forms["form"]["unknownname"] == false) {
alert ("What ever");
return false;
}

 

document.forms["form"]["targetname"] is a form INPUT text

document.forms["form"]["unknownname"] is a form INPUT checkbox

 

I suspect the problem is due to 'false'.. but I can't figure out why.

Link to comment
https://forums.phpfreaks.com/topic/259027-am-i-using-false-the-correct-way/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.