• 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

popup window

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

I am having a problem in tryign to get a pop up window.

When a user tries to update data in a table, teh action class calls a method that updates data. If teh table is updated, this method returns tru. Now, I would like to inform the user using a pop up window that the table has been updated. Can some one please let me know way to achieve this?

Thanks for your time
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would find that very frustrating if I, as a user, had to close a popup window every time I changed a table. I recommend displaying a message on the results screen instead. Just my 2cents.

To accomplish what you asked you would have to use javascript in your results page to cause another window to be opened upon the onload event of the results page.
 
Hari priya
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Marc for your response.

Your suggestion to display a message sound good to me too. My question is, I get the boolean value true / false when the record is updated. How will I access this variable in the javascript or jsp pages?

thanks again.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One way to do this would be to instantiate an org.apache.struts.action.ActionMessages object, place an org.apache.struts.action.ActionMessage object in it using the add() method, and then calling the saveMessages() method from the Action class (It's declared in the Action superClass). Within your jsp, insert a <html:messages /> tag where you want the message to be displayed. It will only be displayed if there actually is a message to display.

Merrill
 
reply
    Bookmark Topic Watch Topic
  • New Topic