This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how can i use javascript variable in jsp  RSS feed

 
arulraj michaelraj
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I want search in hashtable which is in jsp
but i have to implement this process using javascript variable
like this

fuction hello(funtionid)
{
namelist.get(functionid)
}
here
functionid is javascript variable
namelist is hashtable which is in jsp.


please tell me suggestion
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is impossible, you can't access JSP (server side) with Javascript (client side)
 
Frederic Filiatrault
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And to complete, only way would that you dynamically write the declaration of an array in the output as JavaScript code and then, would be able to use it.

Painful but that`s life !
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!