This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I pass data from a JSP to popup window?  RSS feed

 
Anoobkumar Padmanabhan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers

I have a doubt regarding generating the popup windows. can I pass data from the parent JSP page to the called popup window?
if yes, please let me know how we can do it

Thanks in Advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You can do so in a number of ways. Perhaps you should expand a bit upon the nature of the data.
 
Anoobkumar Padmanabhan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a set of data in my JSP page. when i click on one link, i have to show a popup, that will display the details from this JSP page. How can i do that?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the data is textual in nature, you can add it as request parameters to the URL of the popup. Otherwise, you might consider storing it in the session so that it also available to the request that's building the page for the popup. Be sure to remove it from the session when no longer needed.

Remember, you can't really "pass" the data from the JSP to the popup. The JSP executes on the server and all that is sent to the browser (where the JavaScript that creates the popup will execute) is the resulting HTML page.

Another possibility is to have each JSP fetch the data using the same back-end mechanism rather than any "passing" of data. That's the way that I would approach it. I always view a JSP as a dead-end and not a source of data.
[ September 06, 2008: Message edited by: Bear Bibeault ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!