Hi guys,
I'm getting a type mismatch error with the following function:
function checksubmit()
if doc.Total_Method_2004.value <> 100 or doc.Total_Method_2005.value <> 100 or doc.Total_Method_2006.value <> 100 then
msgbox "Method distributions must sum to 100%"
checksubmit = False
else
if doc.Total_all.value <> doc.Target_all.value then
msgbox "All year totals must equal their target totals."
checksubmit = False
else
checksubmit = True
end if
end if
end function
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:
function checksubmit()
if doc.Total_Method_2004.value <> 100 or doc.Total_Method_2005.value <> 100 or doc.Total_Method_2006.value <> 100 then
msgbox "Method distributions must sum to 100%"
checksubmit = False
else
if doc.Total_all.value <> doc.Target_all.value then
msgbox "All year totals must equal their target totals."
checksubmit = False
else
checksubmit = True
end if
end if
end function
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