2013-05-19 21:22:21 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<script type="text/vbscript">
|
|
|
|
<!--
|
|
|
|
Dim counter
|
|
|
|
|
|
|
|
counter = 1
|
|
|
|
|
|
|
|
Sub ok(b,m)
|
|
|
|
Call external.ok(b,m)
|
|
|
|
End Sub
|
|
|
|
-->
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
' Verifies that we're in VBScript although there is no type specified
|
|
|
|
If true then counter = counter+1
|
|
|
|
function inccounter(x)
|
|
|
|
counter = counter+x
|
|
|
|
end function
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
// We're in javascript
|
|
|
|
try {
|
|
|
|
counter++;
|
|
|
|
incCounter(2);
|
|
|
|
}catch(e) {
|
2014-10-02 09:51:45 +00:00
|
|
|
ok(false, "got an exception " + e.message);
|
2013-05-19 21:22:21 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
' And back to VBScript
|
|
|
|
If true then counter = counter+1
|
|
|
|
|
|
|
|
Sub runTest()
|
|
|
|
Call ok(counter = 6, "counter = " & counter)
|
|
|
|
Call ok(isNull(document.onkeyup), "document.onkeyup is not null")
|
|
|
|
Call ok(document.formname.tagName = "FORM", "document.form.tagName = " & document.formname.tagName)
|
|
|
|
Call ok(formname.tagName = "FORM", "form.tagName = " & formname.tagName)
|
|
|
|
Call external.reportSuccess()
|
|
|
|
End Sub
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
// We're in javascript
|
|
|
|
</script>
|
|
|
|
<body onload="If true then runTest()">
|
|
|
|
<form name="formname"></form>
|
|
|
|
</body>
|
|
|
|
</html>
|