• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ajax call using jquery, json, struts

 
Aris Tan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Based on a dropdown selection, I'm trying to make an ajax call using jquery, json



From the debugger, I can see that it is going thru this line:
String myString = new JSONObject().put("JSON", "Hello, World!").toString();

But nothing is happening on the front end, Is there anything else I need to do?

Appreciate the help.
[ April 28, 2008: Message edited by: Aris Tan ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65122
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extermely hard to read and many people that might be able to help you will just move along. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65122
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you not getting the alert?

Does firebug show that the request is successfully completing?
 
Aris Tan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I'm not getting the alert. What's interesting is that I get the alert when I use '$.get'. what am I missing?

Thanks for the UBB code tag tip btw
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65122
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Firebug in Firefox to examine the response of the request to make sure it's valid JSON.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic