• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scriptlets in javascript

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to paint dynamic content on a popup window. Can i use jsp scriptlets in between document.write to get the dynamic data?

If yes. is it a good idea? any tutorial will be great!!!
If no. What is the best way to achieve this functionality?

Thanks and regards,
Karan
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can.
It's important to understand, however, that your JSP code and your Javascript code are running on two different machines; effectively at different times.

Think of it this way: Your JSP code is writing your HTML and Javascript code.

Until you're comfortable with this idea, it's a good idea to look at the HTML source that gets sent to your browser.
 
Karan Jain
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ben,
Thanks for the reply!!!

Its bit confusing.
Can you please give some sample code. I am not able to find some good example on google.

thanks for your help...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Karan Jain:
Hi Ben,
Thanks for the reply!!!

Its bit confusing.
Can you please give some sample code. I am not able to find some good example on google.

thanks for your help...



Not for what you're trying to do but one of our sheriffs, Bear Bibeault has written a nice journal article explaining this.
http://www.javaranch.com/journal/200510/Journal200510.jsp#a1
 
Paper beats rock. Scissors beats tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic