Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to pass JSTL property to jquery.  RSS feed

 
Monica Shiralkar
Ranch Hand
Posts: 886
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to pass JSTL property to jquery. When it display jquery property as an alert it displays blank.






However it displays blank in the alert.

thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly an expression such as ${whatever} is not JSTL, it's EL. You need to know the difference.

Secondly, in your alert statement there is no notation for the JSTL or EL. If product.id is to be evaluated as an EL expression, you must notate it as such. So how would you do that?

Thirdly, these types of issues are easily debugged by looking at the HTML that is sent to the browser. If you look at the alert statement in the browsers tools, you can see if the correct server-side substitution has occurred or not. Has it?
 
Monica Shiralkar
Ranch Hand
Posts: 886
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks. the issue is resolved.

below is the code that works fine:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!