Call ASP without refreshing a new page

Source: Internet
Author: User
A specific example of RS technology
In the previous post, I introduced the basic working principle of RS, obviously, using RS technology in the design of a website will play a significant role (especially the biggest advantage of RS, server code can be called without refreshing new pages ). Because of this feature, you can write a program in the traditional C/S mode, I have processed the data in the database (I am sure you want to know how to implement it). The following is a specific example. Debugging this program is almost exhausting me, haha .)
From the preceding description, we can see that to use RS technology, the client and server must meet the following two conditions:
1. The client only needs to support Java applet.
2. The server only needs to support ASP.
In other words, the RS technology is completely independent from the browser (of course, the browser must at least support Java and JavaScript). You can use it in IE or in NC, this is also a notable difference with RDS technology.
Before using the RS technology in a flexible manner, we should first introduce a problem, that is, the "Asynchronous call" mentioned earlier. It is precisely because of asynchronous calls that you can only refresh a part of the page without refreshing the whole page.
Because of this feature, you can enable the server to check the validity of your input data while browsing the page (of course, this can be a series of complicated legitimacy checks, for example, you need to compare the user input data with the existing data in the database. This is not what the client JS can solve). Then, when the server returns the check result, you can perform the corresponding operations (for example, a dialog box pops up to tell the user that an input error occurs ). the syntax for asynchronous calling is as follows:
RSExecute (serverURL, functionname, param_list)
The first parameter is the complete URL path of the asp page you want to call.
The second parameter is the name of the function you want to call.
The following are the input parameters required by the function.

If the function you want to call requires two input parameters, the following statement is used:
RSExecute (serverURL, functionname, f_arg_1, f_arg_2)
There are two methods for calling,
One is a call method with returned results:
ObjResult = RSExecute (serverURL, functionname, f_arg_1, f_arg_2 );
Another method is to call without returning results:
RSExecute (url, func_name, f_arg_1, f_arg_2, CallbackFunction );
Pay special attention to this call method. The CallbackFunction is a JS function of the client. It indicates that this function will be called immediately once the RS is executed and the call is completed on the server, return the result to the function.
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.