test.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <HTML>
  2. <BODY>
  3. A multi-language Active Debugging demo.
  4. <FORM>
  5. <INPUT NAME="Button1"
  6. VALUE="Click for VB to call JScript!"
  7. TYPE="Button"
  8. OnClick="JScriptEntryPoint"
  9. LANGUAGE="VBScript"
  10. >
  11. <INPUT NAME="Button2"
  12. VALUE="Click for VB to call ForthScript!"
  13. TYPE="Button"
  14. OnClick="ForthEntryPoint2"
  15. LANGUAGE="VBScript"
  16. >
  17. </FORM>
  18. <BR>
  19. <!-- We start with JScript code calling Python... -->
  20. <SCRIPT LANGUAGE="JScript">
  21. function JScriptEntryPoint()
  22. {
  23. PythonEntryPoint2();
  24. }
  25. </SCRIPT>
  26. <!-- Python calling Perl -->
  27. <SCRIPT LANGUAGE="Python">
  28. def PythonEntryPoint():
  29. # Perl works as a property.
  30. result = window.PerlEntryPoint
  31. </SCRIPT>
  32. <SCRIPT LANGUAGE="Python">
  33. def PythonEntryPoint2():
  34. a = 1
  35. b = 2
  36. DoTheCall()
  37. def DoTheCall():
  38. a = 2
  39. b = "Hi there"
  40. window.PythonEntryPoint()
  41. c = "Done it!"
  42. </SCRIPT>
  43. <!-- And some Perl code to call VBScript -->
  44. <SCRIPT LANGUAGE="PerlScript">
  45. sub PerlEntryPoint {
  46. $window->VBScriptEntryPoint();
  47. $window->alert("Perl just called VBScript");
  48. }
  49. </SCRIPT>
  50. <!-- VBscript finally calls our Forth Sample -->
  51. <SCRIPT LANGUAGE="VBScript">
  52. Sub VBScriptEntryPoint
  53. call ForthEntryPoint
  54. End Sub
  55. </SCRIPT>
  56. <SCRIPT LANGUAGE="ForthScript">
  57. : ForthEntryPoint
  58. 1 0 /
  59. "Forth has no one to call" 1 window.alert call
  60. ;
  61. : ForthEntryPoint2
  62. 0 window.JScriptEntryPoint call
  63. ;
  64. </SCRIPT>
  65. </BODY>
  66. </HTML>