Old Pedant:
Thanks for your help! This just gets stranger and stranger. The code below WORKS for me:
<html>
<script language='Javascript'>
IsMCS("
JS CALL");
function IsMCS(strParm)
{
alert("In IsMCS " + strParm);
}
</script>
<script language='VBScript'>
StatusButtonScript()
sub StatusButtonScript()
msgbox "In StatusButtonScript"
IsMCS("
VB CALL")
msgbox "After function call"
end sub
</script>
</html>
producing four msgboxes in this order, as expected:
In IsMCS
JS CALL
In Status Button Script
In IsMCS
VB Call
After function call
But this code, which just switches the order of the two scripts:
<html>
<script language='VBScript'>
StatusButtonScript()
sub StatusButtonScript()
msgbox "In StatusButtonScript"
IsMCS("
VB CALL")
msgbox "After function call"
end sub
</script>
<script language='Javascript'>
IsMCS("
JS CALL");
function IsMCS(strParm)
{
alert("In IsMCS " + strParm);
}
</script>
</html>
produces just TWO message boxes:
In StatusButtonScript
In IsMCS
JS Call
Neither "In IsMCS
VB Call" nor "After function call" appears, so it looks like it's failing in the
VB call to IsMCS, but no error is even returned to identify what is happening. The expected "Type Mismatch: IsMCS" has disappeared, but it doesn't look to me like it got past the
VB call to IsMCS. If it couldn't find the
JS function, I'd have expected it would return the ubiquitous "Object undefined" error, or something equally vague. But it's not indicating any error was encountered - it just doesn't run. Curiouser and curiouser!
In any case, as joefawcett suggested, there is little I can't do in vbscript. In this case, the issue wasn't as simple as displaying a msgbox (and I do know how to use them in vbscript), but rather an httpRequest. I had a functioning javascript version that worked and just wanted to reuse it. But as that didn't want to cooperate in this instance, I figured out how to do it in vbscript instead, as joefawcett suggested. Goodbye uncooperative javascript function!
Thanks for your help!