• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting value from AJAX

 
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my web application i use AJAX to retrieve the data from server without refreshing the page.While in a case, i am in need to pass two values to JSP and so i decided to do it with Array. I just pass the Array to JSP and i don't know how to retrieve the Array values in JSP... Please help me ranchers......
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post you JavaScript code which uses AJAX !
And you can have a look on different methods suggested to retrieve AJAX response , here !
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sagar Rohankar:
Please post you JavaScript code which uses AJAX !
And you can have a look on different methods suggested to retrieve AJAX response , here !



: Edited :
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The link is valid and opening at my side !

Anyways, Here is what learned in a day about AJAX response (Just a day old in AJAX )!

Ajax response either in text format OR in XML format i.e no object , no Array you can returned !
If you want to response the two array element , then you can append those two values in single string separated by comma and when you receive this string , you can parsed it on JavaScript and display on JSP.



If you are OK with this, you can proceed !
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sagar, you are not getting my question... What i want is to pass two values as argument to JSP page and rip it on the JSP page... Not getting multiple values from JSP.. I already finished those things...
I need to send more than one value from AJAX to JSP page.... Please help me friends.....
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rajkumar balakrishnan:

I need to send more than one value from AJAX to JSP page.... Please help me friends.....



Thats what I suggest you my friend ! May be you can post your action/servlet/jsp (getcustomereport.jsp, I think your using JSP to do some action) , file which doing some server side things for you , which result you want to return on JSP page !
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This link may open up at you side , explains various type of AJAX Response !
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sagar Rohankar:
This link may open up at you side , explains various type of AJAX Response !





I succeed with it.. Yes, now i can able to send any number of parameters from AJAX to JSP and now the problem is getting harder with some typo... SO thanks Sagar for your time and valuable reply...
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The above link is for explaining the various format of AJAX response !

And you are welcome !
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic