sondev
IS-IT--Management
- Jan 7, 2005
- 22
I need a small script that will verify that three fields are not empty. If one or more of the three fields is empty then "onClick" should recieve an error and a message preventing the button action from submitting. If all the fields are filled in then "onClick" should process the action. My script looks like this so far:
function Validate()
{
var InvoiceNum = Invoice
var OrderNum = Order
var InvoiceDate = DateBilled
var message="Your command cannot be completed. One of the required fields is not completed. Please fill in the correct information and then proceed.";
if (InvoiceNum = "");(OrderNum = "");(InvoiceDate = "");
alert(message);
else ???
}
Since I am a beginner with Jscript, I am not sure how the syntax should be completed. I have all the feilds defined properly. I just need the script to evaluate each to see if its empty and then display the error message or submit the action.
function Validate()
{
var InvoiceNum = Invoice
var OrderNum = Order
var InvoiceDate = DateBilled
var message="Your command cannot be completed. One of the required fields is not completed. Please fill in the correct information and then proceed.";
if (InvoiceNum = "");(OrderNum = "");(InvoiceDate = "");
alert(message);
else ???
}
Since I am a beginner with Jscript, I am not sure how the syntax should be completed. I have all the feilds defined properly. I just need the script to evaluate each to see if its empty and then display the error message or submit the action.