Hi,
How can i pass an array from jsp to javascript function.i have to design a grid in jsp.For that i'm using javascript functions.
http://www.code-magazine.com/article.aspx?quickid=0303111&page=3 this is the link where i got the script.here i have to pass an array of values to display in that grid.can any one pls help me in this regard.
thank u inadvance.

Recommended Answers

All 6 Replies

You can't, not directly.
What you can do is generate a piece of Javascript as part of the JSP rendering that the Javascript can use.
Something like

x[1] = '<c:out value="${blub}"/>';
x[2] = '<c:out value="${blah}"/>';

HI!
i am also trying to use Grid.But i don't have a source for Grid.i am doing project in java struts.so i need to display the value inside the Gird.so give me a source if you have any option....
thank you,
kaleeswaran

kaleeswaranm please read the rules.. We don't do other people's homework!!

kaleeswaranm, Must read the rule first. only the similar help that can be provide. No home work.

I think AcidBurn told you this.

@ukbasak - you just made my day, barking on thread that is one year old and forgotten

@ukbasak - you just made my day, barking on thread that is one year old and forgotten

especially since he's just pointing out what the last post said.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.