aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Issue regarding a basic AJAX project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Issue regarding a basic AJAX project" Watch "Issue regarding a basic AJAX project" New topic
Author

Issue regarding a basic AJAX project

Rahul Bukkarayasamudram
Greenhorn

Joined: Feb 17, 2009
Posts: 5
Hi,

I am a newbie learning AJAX. I have an issue making the code work. I would really appreciate if you could help me out. I did not use External JavaScript files. I have my servlet and the HTML file.

I am able to call the servlet with the given URL, I have used SOPs on the servlet to see that it is being called. I think the problem is with the response. When I call the 'callback()' function, the status of the req.readystate is never equal to 4.

The alert message informs me that the value is "one". That is reason why I do not proceed any further and cannot call the parseMessage() and setMessage() functions, which receive the request from the servlet and update the HTML.

This is my HTML file:



The code for my servlet is:




Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61198
    
  66

Are you using Firebug in Firefox or some other tool to monitor the request and response?

it will show you what's being sent and returned so you can try to narrow down where any problem lies.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rahul Bukkarayasamudram
Greenhorn

Joined: Feb 17, 2009
Posts: 5
Hi,

I appreciate your response. I have not used Firebug till now. I will try to play around with it.

Just by the way, this is my source:

http://java.sun.com/developer/technicalArticles/J2EE/AJAX/

- Rahul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue regarding a basic AJAX project