| Author |
Confusion on whether there is anything Ajax can do but JavaScript cannot do?
|
Monica. Shiralkar
Ranch Hand
Joined: Jul 07, 2012
Posts: 183
|
|
Using AJAX we can change part of a JSP page without reloading the entire page. But cant this be done using simple Javascipt. E.g of a AJAX task is populating cities based on states in dropdown.But cant this be done using Javascript.So what is there in AJAX which simple javascript cannot do?
Thanks.
|
 |
Greg Charles
Bartender
Joined: Oct 01, 2001
Posts: 2538
|
|
|
When you say AJAX, you mean you're sending a request to the server, getting back a response, and using the response to update the DOM, i.e. part of the HTML page. JavaScript is involved of course. In fact it is the J in AJAX.
|
 |
William P O'Sullivan
Ranch Hand
Joined: Mar 28, 2012
Posts: 860
|
|
True to a certain degree, JavaScript *can* be used to rewrite the HTML contents (the DOM) in the browser.
Now how would you say access a back-end business process, update a monthly sales figure without an AJAX
call back to the application server, return the data and rewrite it using Ajax.
They work together.
WP
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
As Ajax is part of JavaScript it's a pointless question. It's like asking if there's something the java.net classes can do that Java cannot.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Monica. Shiralkar
Ranch Hand
Joined: Jul 07, 2012
Posts: 183
|
|
|
Thanks.I got the point.
|
 |
 |
|
|
subject: Confusion on whether there is anything Ajax can do but JavaScript cannot do?
|
|
|