I'm new to javascript and I can't figure out what is wrong with this...
any ideas? It is erroring out on the last like ];
- Matt
"If I must boast, I will boast of the things that show my weakness"
- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
Code:
//Form Validation
function validate() {
var Name = $('#name').val();
var DOP = $('#dop').val();
var POP = $('#pop').val();
var AMO = $('#amount').val();
var chargeName = $('#chargeName').val();
var Bud = $('#budget').val();
var Res = $('#reserve').val();
//alert ( Name+ ' ' + DOP + ' ' + POP + ' '+ AMO+ ' '+ chargeName);
//var searchCriteria = '';
if((Name == "--Please Select--" || Name == "" || DOP == "" || POP == "" || chargeName == "" || chargeName == "--Please Select--" || AMO == "") || ((Bud == "" || Bud=="--Please Select--") && (Res =="" || Res == "--Please Select--"))){
alert( 'Please fill in all of the fields');
return false;
} else if (AMO == parseFloat(AMO)){
alert('Amount of Purchase must be numeric');
return false;
};
any ideas? It is erroring out on the last like ];
- Matt
"If I must boast, I will boast of the things that show my weakness"
- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008