I have an alert function I am trying to use similair to below.
if(document.selectcomm.reportid.value == "")
{
alert("My Alert");
return false;
}
However I want to modify it so that it checks for a specific value in a list rather than if "">
For example:
I want to run the Alert if the value of document.selectcomm.reportid is one of the following items: reportA,reportB,reportC
The list of items will be dynamic and could be different every time the page is loaded, it comes for the DB.
Thanks very much in advance.
if(document.selectcomm.reportid.value == "")
{
alert("My Alert");
return false;
}
However I want to modify it so that it checks for a specific value in a list rather than if "">
For example:
I want to run the Alert if the value of document.selectcomm.reportid is one of the following items: reportA,reportB,reportC
The list of items will be dynamic and could be different every time the page is loaded, it comes for the DB.
Thanks very much in advance.