When we use AJAX for validation the response comes through xml file and in case of javascript the response comes through html page.
Is it true or false ? please explian both the cases.
When we use AJAX for validation the response comes through xml file and in case of javascript the response comes through html page.
Is it true or false ? please explian both the cases.
Ajax can return pretty much anything. Your particular application or implementation might be returning XML, but Ajax commonly returns JSON and HTML as well. But it can return TXT or just status codes ..
AJAX is such a broad term that both of your cases can be called like that. Basically every call from already loaded page is AJAX even if it's done by dynamically creating tag or refreshing iframe.
actually Ajax is nothing but a term to describe what is happening, the response comes as an xml or html depending on what you want it to return, it is a string that ajax returns, in Javascript it is up to you what to do with that string, want to parse it as XML node? want to display it immidiately in an element "innerHMTL" or want to alert the returned string... the power of ajax is not what it returns, it is what it does on the server (remotly) without having to send the whole page in.
AJAX there can be any type of return text. With Javascript it can work on the DOM object and get anything from the page.
The main difference, AJAX a request goes to the server and the result is returned.