Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confusion on whether there is anything Ajax can do but JavaScript cannot do?

 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.I got the point.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic