My solution would be to set your variable in the VBScript server-side and then flush the result out to the page in a different JavaScript function that calls your other JavaScript function. Sample (untested) as follows:
<%
Dim bEnablePRField
bEnablePRField = Request.Form("checkboxEnablePRField") <> ""
%>
<script type="text/javascript">
function EnablePRField() {
if (<%=bEnablePRField%> === 'False') {
disableListHeaderPR();
}
}
function disableListHeaderPR() {
if (dateDifference(document.getElementById("txtCommDte").value, "05/04/2012") < 0 ) {
return false;
} else {
return true;
}
}
</script>
Something very similar to that should work for you.
I feel I should point out that, for Classic ASP, the VBScript is only processed server-side so this should work in any browser that supports JavaScript. Before I switched to .Net, I used to pull this trick a lot, and it worked fine in Firefox, as well as IE.
Should you wish instead to use the results of your JavaScript function in your VBScript function, simply store the results of the JavaScript function in a hidden field (e.g., <input id="myResults" name="myResults" type="hidden" />) and then access the value in VBScript (e.g., Request.Form("myResults").
You can also use the hidden field if you are mixing VBScript and JavaScript on the client-side. Just change the way you access the hidden field in VBScript (e.g., document.form("myForm").myResults.value).
Finally, I cannot agree more with techfoobar. If you are mixing VBScript and JavaScript on the client-side, then the only browser it will work in is IE and I would also strongly recommend switching over entirely to JavaScript.
Hope this helps,
Pete