search
HomeWeb Front-endHTML TutorialAbout page partial refresh routine_html/css_WEB-ITnose


A specific example of RS technology
In the previous post, I introduced the basic working principle of RS. Obviously, if RS technology is applied to the design of a
website, it will have many extraordinary effects ( Especially its biggest advantage is that it can call the server-side code without refreshing the
page). It is precisely because of this feature that you can process the data in the database just like writing a
traditional C/S mode program (I think everyone must want to know how to implement it, below. To give a specific example, debugging this broken program almost exhausted me, haha)
As you can see from the previous description, to use RS technology, the client and server need to 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, RS technology is completely independent of the browser (of course the browser needs to at least support Java
and JavaScript). You can use it in IE, too. It can be completely used in
NC, which is also a significant feature that distinguishes it from RDS technology.
Before being able to use RS technology flexibly, we must first explain an issue, which is the issue of "asynchronous call"
that was mentioned before. It is precisely because of the asynchronous call that you can only refresh a certain part of the page without refreshing
the entire page.
Due to this feature, you can let the server
check the validity of the data you input while you are browsing the page (of course this can be a series of very complex legality checks, for example,
Compare the data entered by the user with the existing data in the database, etc. This cannot be solved by the client's JS)
Then when the server returns the check result, you can perform the corresponding operation (such as popping up a The dialog box tells the user
Input errors, etc.)
The syntax for asynchronous calls is as follows:
RSExecute(serverURL, functionname, param_list)
The first parameter is the complete asp page you want to call URL path
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, it is written like this:
RSExecute(serverURL, functionname, f_arg_1, f_arg_2)
There are two ways to write when calling,
One is to return a result:
objResult = RSExecute(serverURL, functionname, f_arg_1 , f_arg_2);
The other is a calling method that does not return a result:
RSExecute(url, func_name, f_arg_1, f_arg_2, CallbackFunction);
Special attention should be paid to this calling method. It is a JS function on the client
. It means that once RS completes the call on the server, it will call this function immediately and return the result to this
function.
A typical CallbackFunction function should have the following structure:
function CallbackFunction(objResult) {
//Your own processing
}
The only input parameter objResult is called by RS Return value.
Let’s assume a situation like this:
The user enters the user’s e-mail address in the browser, and then the user leaves the e-mail address input box
and enters the next input process , this time it is time for RS to come into play. It queries the address in the database of the
server based on the address entered by the user, and then determines whether the user already exists, and then
returns the result to the client. The client then uses DHTML technology to prompt the user for the information previously entered in an input box called "ShowResult"
.
function CallbackFunc(objResult) {
// Prompt user information
window[objResult.context].value = objResult.return_value;
}
And RSExecute() should be called like this
RSExecute(serverURL, functionname, f_arg_1, CallbackFunc, "ShowResult");
No more, no more, the above is so long-winded, I think everyone is confused, so the following is
Let the specific code speak for itself:
(Please create a system DSN file called NW on your server before using the code. This file uses
Northworld, the sample database that comes with Chinese ACCESS97)
The following example works like this. default.htm is divided into two frames. RS technology is used in the
main.html page. You can notice that submit
is not used in main.html. So if If you hit the Enter key directly on this page, nothing will appear. You must click the
"Get Information" button with the mouse to use this partial page refresh technology. After clicking the button, there will be
a small delay on the page (during this time the java applet establishes a connection with the server in the background)
Then the page will return to the normal mouse immediately, and you can continue to perform other operations on the page.
Instead of having to wait for data like when a normal page is refreshed.
Everyone can understand info.asp at a glance. It is actually a very simple program for processing strings.
If you are familiar with DHTML technology, you can complete these operations on the client.
As for EmpData.asp, it is the program for processing data on the server side.
Well, you can experience the benefits yourself
.

Be especially careful not to change too much code, otherwise it is easy to make mistakes. After all, you are programming in JavaScript.

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
HTML, CSS, and JavaScript: Examples and Practical ApplicationsHTML, CSS, and JavaScript: Examples and Practical ApplicationsMay 09, 2025 am 12:01 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

How do you set the lang attribute on the  tag? Why is this important?How do you set the lang attribute on the tag? Why is this important?May 08, 2025 am 12:03 AM

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML in Action: Examples of Website StructureHTML in Action: Examples of Website StructureMay 05, 2025 am 12:03 AM

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

How do you insert an image into an HTML page?How do you insert an image into an HTML page?May 04, 2025 am 12:02 AM

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

HTML's Purpose: Enabling Web Browsers to Display ContentHTML's Purpose: Enabling Web Browsers to Display ContentMay 03, 2025 am 12:03 AM

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

Why are HTML tags important for web development?Why are HTML tags important for web development?May 02, 2025 am 12:03 AM

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software