diff options
Diffstat (limited to 'tests/reproducers/simple/JavascriptFuncParam/resources/JavascriptFuncParam.html')
-rw-r--r-- | tests/reproducers/simple/JavascriptFuncParam/resources/JavascriptFuncParam.html | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/reproducers/simple/JavascriptFuncParam/resources/JavascriptFuncParam.html b/tests/reproducers/simple/JavascriptFuncParam/resources/JavascriptFuncParam.html new file mode 100644 index 0000000..bc99d99 --- /dev/null +++ b/tests/reproducers/simple/JavascriptFuncParam/resources/JavascriptFuncParam.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html lang="en-US"> + <head> + <title>Java JavaScript LiveConnect - Function Parameters</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + </head> + <body> + + <h2> The JToJSFuncParam html page</h2> + + <applet code="JavascriptFuncParam" width="1000" height="100" id="jtojsFuncParamApplet" MAYSCRIPT> + <param name="jnlp_href" value="javascript-funcparam.jnlp"> + </applet> + + <script type="text/javascript"> + + function JJSParameterTypeFunc(type_parameter, js_str_param) { + var str = "Call with "+type_parameter.toString() + ":" + typeof(type_parameter) + " from J"; + applet.printOut(str); + + var value = eval(js_str_param); + JSSubFunc(value); + } + + function JSSubFunc(type_parameter) { + var str = "Call with "+type_parameter.toString() + ":" + typeof(type_parameter) + " from JS"; + applet.printOut(str); + } + + var applet = document.getElementById('jtojsFuncParamApplet'); + var urlArgs = document.URL.split("?"); + var func = urlArgs[1]; + + applet[func](); + applet.printOut("afterTests"); + + </script> + + </body> +</html> |