Using HTML Definitions and the GetJavaScriptURL Method
HTML definitions can contain JavaScript programs in addition to HTML. If you have an HTML definition that contains JavaScript, use the GetJavaScriptURL Response method to access and execute the script.
This example assumes the existence in the database of a HTML definition called HelloWorld_JS that contains some JavaScript:
Function IScript_TestJavaScript()
%Response.WriteLine("<script src= " |
%Response.GetJavaScriptURL(HTML.HelloWorld_JS) | "></script>");
End-Function;