Todd Smith wrote:I am trying to change the JSP to load a new JSP instead of displaying the results on the same jsp. Kind of a JSP in side of a JSP.
Todd Smith wrote:I just need to know how to display the results in an included jsp instead of replacing the DIV tag and displaying the results.
Bear Bibeault wrote:P.S. Why are you POSTing to a JSP?
Bear Bibeault wrote:Again, why a POST? All indications is that it should be a GET.
jq.load('ajax-add-page1.jsp',data);
Bear Bibeault wrote:
jq.load('ajax-add-page1.jsp',data);
This is not the correct way to use the .load() method. It's a jQuery method, not a utility function. It must be called on a selector that identifies the element into which the response will be injected.
Bear Bibeault wrote:"doesn't work" doesn't tell me anything useful. What is happening?
Bear Bibeault wrote:The mostly likely cause of that is the response is not being returned correctly. What you have you done to look at the status and body of the response?
Bear Bibeault wrote:You're not using a JavaScript debugger?
![]()
Download the Firebug plugin for Firefox. All of the other modern browsers have built-in debuggers.
Use the debugger to look at the Ajax request/response.
Bear Bibeault wrote:That obviously means that the URL is malformed. What's your next step?
(Hint: page-relative URLs are death in a web application.)
Todd Smith wrote:My Spring control is returning a Java listarray of objects.
Bear Bibeault wrote:
Todd Smith wrote:My Spring control is returning a Java listarray of objects.
No it's not. It can't. An HTTP response can only be text. Is it perhaps returning JSON or some other format? You are going to need to get your data transfer straight before any kind of progrss can be made.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |