By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,265 Members | 1,690 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,265 IT Pros & Developers. It's quick & easy.

How to create dynamic javascript arrays using dojo toolkits

P: 58
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.
Jan 2 '08 #1
Share this Question
Share on Google+
5 Replies


acoder
Expert Mod 15k+
P: 16,027
Show an example of the data that is returned. What format is it in?
Jan 2 '08 #2

P: 58
Show an example of the data that is returned. What format is it in?
Hey Frens,

It is done, Hurrey....
Thanks
Jan 4 '08 #3

acoder
Expert Mod 15k+
P: 16,027
Glad you got it working. Perhaps you could post your solution so that it might help someone else viewing this thread.
Jan 4 '08 #4

P: 58
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
Jan 5 '08 #5

acoder
Expert Mod 15k+
P: 16,027
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.
Jan 5 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.