• 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

pass a parameter from a struts ActionForm to a javascript fn

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone,

Is there a way to pass a parameter from the struts action or use the struts ActionForm variable to a javascript fn on the jsp which should open a new pop -up browser window with that parameter ?

Thanks,
Gayatri
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if you just do a bean:write inside your script tags you'll get the value of the variable as those tags are parsed before the page is loaded thus before the javascript can ever possibly be executed
 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I have a similar question, but instead of passing a parameter, can you pass an actual object?

For example, I have an object, and I want to pass it to a javascript function which will then call a popup.

Can only strings be passed, or can an object be passed to a javascript function?
 
reply
    Bookmark Topic Watch Topic
  • New Topic