FAQ about Ajax-Part I

Source: Internet
Author: User
Q:
Does Ajax use still use a request/response model?
A:
Actually, your pages are still making request and getting responses. you 'are using a different approach in how you make those requests and handle the response -- now you use original cirpt to make the actual request, instead of just submitting a web form.

Q:
Why not just submit the form normally? What does Using ajax really do for us?
A:
The javascript code in an Ajax application sends your requess to be processed by the Serer, but doesnot wait for an Anser. even better, JavaScript can also work with the server's response, instead of reloading the entire page when the server is finished with your request.

Q:
So does the page ever get back a resposne?
A:
That's where the asynchronous part of Ajax comes in. when the serve sends back a response, JavaScript can update a page with new values, change an image, or even take the user to a whole new web page, and the user never has to wait around und while all this is going in.

Q:
So shoshould we use Ajax for all of my requests?
A:
There are still of times when you'll want to use traditional WEB programming. for instance, when a form is totally filled out, you can let the user click a submit button, and then send the entire form to your web server, without using Ajax.
But, you'll use Ajax for most of your dynamic page processing, like changing images, updating fields, and responding to users, if you only need to update part of a page, then Ajax is the way to go.

Q:
What's the relation XML with Ajax?
A:
Sometimes, your ript will use XML to talk back and forth with server, but you don't always need to use XML for your reqeusts.

Q:
Does use have to use a certain browser to use Ajax apps?
A:
No, as long as your uses have javascript enabled in their Web browers, this code shocould work without any problems. so your Ajax apps wil run just fine on Firefox, Mozilla, ie, Netscape, and opera.

Q:
What if someone has JavaScript disabeld in their browser?
A:
Unfortunately, Ajax apps require JavaScript to run. So users who have javacript disabled are not going to be able to use your Ajax apps.

Q:
We got two ways to send our client data to server, post and get. Maybe post is better than get?
A:
Post is usually used when you are sending a Serer lots of data. But get is not like this.

Q:
What's Dom, and how the Dom with a HTML page?
A:
Dom is the abbriviated form for Document Object Model. web server use the Dom to represent an HTML web page. our javascript can use the Dom to update values in a page. dom can manipulate all elements in the hmtl page. for examples: document. getelementbyid ("username") such like that .. :)

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.