Remember, the Java stub contacts the remote .ASP page so the .ASP page has to be configured to recieve requests from the STUB and process them accordingly.
This is done by adding the following lines to an ASP page you are going to call from remote scripting:
RSDispatch prepares the .ASP file for execution by remote scripting.
The next thing you need is a Description object. The Description object is a Javascript function that "exports" your functions to the remote scripting engine.
[color #ff0000]
<SCRIPT RUNAT=SERVER Language=javascript>
function Description()
{ [/color]
Inside the description object you need to define what procedures you are calling. If you are using Javascript in your ASP code all you have to do is:
[color #ff0000]this.myFunction = myFunction;
} //end of Description Function
//Function to be called by web page
function myFunction(param1, param2,...)
{
...
}
[/color]
You can define as many procedures and functions as you need. Simply create a [color #ff0000]this.functionname = functionname; [/color] for each function you want to export.
If you are using VBScript then you need a little extra work. Javascript supports a function object. You can use this function object to "trick" the Description object into working with VBScript.
[color #ff0000]
<SCRIPT RUNAT=SERVER Language=javascript>
function Description()
{
this.myFunction = Function('param1','param2','return myFunction(param1,param2)');
} //end of description object
</SCRIPT> <!-- end of javascript -->
<SCRIPT Language=VBScript>
'Function to be called from web page
function myFunction(param1, param2)
...
end function
</SCRIPT> <!-- end of vbscript -->
[/color]
Once you have your ASP page configured to accept remote scripting requests, you can begin to write your client side HTML code.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.