jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes passing jsp value to javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "passing jsp value to javascript" Watch "passing jsp value to javascript" New topic

passing jsp value to javascript

rodrigo bengoechea

Joined: Nov 15, 2008
Posts: 10
Hi!!! Happy new year for everyone!!!
I'm developing a web application in which a user can create and join groups to share files and messages. In the welcome page of any user it's displayed the list of groups the user is member.
The problem I'm trying to solve is that, once the list is displayed, if the user clicks on the link of any group the application must redirect to the main page of that group. The javascript recieve the index of the list of groups. But I must be doing something wrong because the javascript is never excecuted...

Here I post the code when the list is diplayed in the jsp and the call to the javascript:

And here I post the javascript function code:

Thanks everyone in advance!!

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63869

Remember that the JSP, along with the Struts tags, execute on the server in order to create the HTML page that is sent to the browser. So looking at the JSP source is rather unhelpful.

Rather, do a View Source in the browser to see what got sent. Is it what you expected? Is the HTML and JavaScript valid?
[ January 01, 2009: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385

I agree. Here's the link: http://aspose.com/file-tools
subject: passing jsp value to javascript
It's not a secret anymore!