The biggest feature of remote scripting call technology (Sqlremote scripting) is that client script calls server scripts without refreshing the entire page. General situation
, Web pages need to submit form data when interacting with the server, refreshing the entire page. This is not only conducive to improving the browsing effect, but also not conducive to improving server efficiency
Rate. Using remote scripting to invoke technology (remote scripting), client script can invoke remoted script functions like local functions, thereby greatly
facilitates the development of interactive Web applications. Make browser-based applications closer to traditional WIN32 applications. In complex form validation and frequent database
Operation, the advantage of applying the remote scripting call technology is obvious.
Here is an example to illustrate. Its function is: in the client input text, and then call the server-side script functions, the SessionID and IP address to display to
User.
First, the basic principle
The Remote scripting Call technology provides a set of interface functions. With this set of interface functions, a client program can use a proxy procedure (a Java applet)
Invokes the server-side code. Javaapplet (Rsproxy.class) works in the background, usually the user code does not need to manipulate it directly, and its configuration is
Automatically completed. A remote script call can be either a synchronous call (after the invocation command is issued and wait until the server executes the function to return), or it can be
An asynchronous call (returned immediately after a function call, which must be given a callback function at the same time). A remote scripting Call technology example must contain the following supporting files:
Rs.htm: Include client support code
Rsproxy.class: This is a Java applet that actually completes the client/server interaction process
Rs.asp: Server-side support code
(Download address: Http://msdn.microsoft.com/scripting/remotescripting/x86/rs10ben.exe)
When using remote scripting to invoke functionality, both client and server-side code must meet certain requirements. On the server side, you must first enable remote script tuning
Use: Include rs.asp with #include, and call RSDispatch function (see sample.asp file). The key to implementing remote scripting support on the server side is
Creates a Public_description object. For a remote script to invoke the client, the ASP file can be viewed as a public_description
All other functions in the ASP file are private, like the object that provides the remote method. This kind of private means that the client program can only be implemented for some specific functions far
Process call. You should avoid writing global ASP code (code that is not encapsulated in a function), which will not be executed when invoked remotely because
The script execution process differs from the normal ASP page execution process. Putting global scripting code into functions and calling them explicitly can ensure that they are executed correctly.
Remote scripting calls technology requires that server-side scripts must be written in JavaScript. This example declares a description class that contains a common
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service