Ajax communication technology-Hidden Frame GET request and POST request

Source: Internet
Author: User

The hidden frame technology has four steps:

 

1. the user interacts with the page through a visible frame, but cannot realize the hidden frame. When the user requests data from the server, the JavaScript function calls the hidden frame, which redirects the hidden frame to another page, more complicated: posting form data.

2. transmit data to the server.

3. Accept the server response. Because you are dealing with frames, this response is another page that includes the data returned by the request and some JavaScript to convert the data into a visible frame.

4. after the returned page is fully loaded, call the function in the visible frame to convert the data to the visible frame. when the data is in the visible frame, the display format is determined by frame.

 

Example of a hidden frame POST request:

Database creation:

CREATE TABLE Customer(    CustomerId INT(11) NOT NULL AUTO_INCREMENT,    Name VARCHAR(255) NOT NULL DEFAULT ‘‘,    Address VARCHAR(255) NOT NULL DEFAULT ‘‘,    City VARCHAR(255) NOT NULL DEFAULT ‘‘,    State VARCHAR(255) NOT NULL DEFAULT ‘‘,    Zip VARCHAR(255) NOT NULL DEFAULT ‘‘,    Phone VARCHAR(255) NOT NULL DEFAULT ‘‘,    Email VARCHAR(255) NOT NULL DEFAULT ‘‘,    PRIMARY KEY(CustomerId)    )ENGIN=MYISAM COMMENT=‘Sample Customer Data‘;
View code

 

 

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.