Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
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.
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.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.