Hi guys,
I'm getting a type mismatch error with the following function:
<script type="text/javascript">
function checksubmit()
{
var doc = document.methods ;
if (doc.Total_Method_2004.value != 100 || doc.Total_Method_2005.value != 100 || doc.Total_Method_2006.value != 100)
{
alert ("Method distributions must sum to 100%"
return false;
}
else
{
if (doc.Total_all.value != doc.Target_all.value)
{ alert ("All year totals must equal their target totals."
return false;
}
{
return true;
}
}
}
</script>
It's being called here:
<form name="methods" method="post" action="categories.asp" onsubmit="return checksubmit()">
I'm able to get into the function and the first alert box "Method Distributions...." but then the error Type mismatch: 'return'
I have no clue what's going on and I have rewritten the function in vbscript and I get the same error. A varation of this function works on all my other pages so there might be a conflict somewhere within this page.
thanks,
stupy
I'm getting a type mismatch error with the following function:
<script type="text/javascript">
function checksubmit()
{
var doc = document.methods ;
if (doc.Total_Method_2004.value != 100 || doc.Total_Method_2005.value != 100 || doc.Total_Method_2006.value != 100)
{
alert ("Method distributions must sum to 100%"
return false;
}
else
{
if (doc.Total_all.value != doc.Target_all.value)
{ alert ("All year totals must equal their target totals."
return false;
}
{
return true;
}
}
}
</script>
It's being called here:
<form name="methods" method="post" action="categories.asp" onsubmit="return checksubmit()">
I'm able to get into the function and the first alert box "Method Distributions...." but then the error Type mismatch: 'return'
I have no clue what's going on and I have rewritten the function in vbscript and I get the same error. A varation of this function works on all my other pages so there might be a conflict somewhere within this page.
thanks,
stupy