How to create dynamic javascript arrays using dojo toolkits

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • plsHelpMe
    New Member
    • Jan 2008
    • 58

    How to create dynamic javascript arrays using dojo toolkits

    How to create dynamic javascript arrays using dojo toolkits
    Hello frens,

    I am in a big trouble. My objective is:

    I am having some categories shown by differnent radio buttons, on the click of a particular radio button i making an ajax call using dojo and retirieving the data corresponding to that category. Now i am suppose to create array of that data using the javascript dynamically. Can anyone please help me for the same.

    For your information:
    I am using struts framework.

    1. I have already tried setting the data corresponding to a category in the VIEWBEAN when ajax call is done, but i doesn't work as the dynamic javascript creating like this doesn't refreshed with the new data when a new radio button is clicked.

    2. I am trying iterating the VIEWBEAN in a new JSP(on which we are being forwarded as a result of AJAX return) and creating a dynamic array using c:for Each tag but here how can i use this array in my original jsp.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Show an example of the data that is returned. What format is it in?

    Comment

    • plsHelpMe
      New Member
      • Jan 2008
      • 58

      #3
      Originally posted by acoder
      Show an example of the data that is returned. What format is it in?
      Hey Frens,

      It is done, Hurrey....
      Thanks

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Glad you got it working. Perhaps you could post your solution so that it might help someone else viewing this thread.

        Comment

        • plsHelpMe
          New Member
          • Jan 2008
          • 58

          #5
          Originally posted by acoder
          Glad you got it working. Perhaps you could post your solution so that it might help someone else viewing this thread.
          Here what i did is as a result of the AJAX call i am forwarding the control to a JSP whose sole porpose is to generate a comma separated string of the required data. That data i am using in my original JSP. Here i am splitting that comma separated string and converting into array which i can use for the further processing.

          If someone has similar problem and i am sounding confusing over here, then u can leave me a post i will surely rply

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Originally posted by plsHelpMe
            Here what i did is as a result of the AJAX call i am forwarding the control to a JSP whose sole porpose is to generate a comma separated string of the required data. That data i am using in my original JSP. Here i am splitting that comma separated string and converting into array which i can use for the further processing.
            Thanks for posting your solution.

            Comment

            Working...