2012-08-13 11:04:18 +02:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<script type="text/vbscript">
|
2012-10-18 11:49:53 +02:00
|
|
|
<!--
|
2012-08-13 11:04:18 +02:00
|
|
|
Dim counter
|
|
|
|
|
|
|
|
counter = 1
|
|
|
|
|
|
|
|
Sub ok(b,m)
|
|
|
|
Call external.ok(b,m)
|
|
|
|
End Sub
|
2012-10-18 11:49:53 +02:00
|
|
|
-->
|
2012-08-13 11:04:18 +02:00
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
' Verifies that we're in VBScript although there is no type specified
|
|
|
|
If true then counter = counter+1
|
2012-09-10 10:34:52 +02:00
|
|
|
function inccounter(x)
|
|
|
|
counter = counter+x
|
|
|
|
end function
|
2012-08-13 11:04:18 +02:00
|
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
// We're in javascript
|
2012-09-10 10:34:52 +02:00
|
|
|
try {
|
|
|
|
counter++;
|
|
|
|
incCounter(2);
|
|
|
|
}catch(e) {
|
|
|
|
ok(false, "got an exception");
|
|
|
|
}
|
2012-08-13 11:04:18 +02:00
|
|
|
</script>
|
2012-09-10 10:34:52 +02:00
|
|
|
<script>
|
2012-08-13 11:04:18 +02:00
|
|
|
' And back to VBScript
|
|
|
|
If true then counter = counter+1
|
|
|
|
|
|
|
|
Sub runTest()
|
2012-09-10 10:34:52 +02:00
|
|
|
Call ok(counter = 6, "counter = " & counter)
|
2012-09-10 10:35:05 +02:00
|
|
|
Call ok(isNull(document.onkeyup), "document.onkeyup is not null")
|
2012-09-10 14:41:09 +02:00
|
|
|
Call ok(document.formname.tagName = "FORM", "document.form.tagName = " & document.formname.tagName)
|
2012-09-25 14:18:30 +02:00
|
|
|
Call ok(formname.tagName = "FORM", "form.tagName = " & formname.tagName)
|
2012-08-13 11:04:18 +02:00
|
|
|
Call external.reportSuccess()
|
|
|
|
End Sub
|
|
|
|
</script>
|
2012-09-10 10:34:52 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
// We're in javascript
|
2012-08-13 11:04:18 +02:00
|
|
|
</script>
|
2012-09-06 11:59:23 +02:00
|
|
|
<body onload="If true then runTest()">
|
2012-09-10 14:41:09 +02:00
|
|
|
<form name="formname"></form>
|
2012-08-13 11:04:18 +02:00
|
|
|
</body>
|
|
|
|
</html>
|