• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Struts and Popup

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
how to show a popup when a I click in a button on my page?
tnks!
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That 'popup' would be on the client browser end right? So it would have to be embedded jscript/javascript/vbscript/etc in the html. It has nothing to do with struts/servlets/jsp.
 
Bruno Frascino
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Billy,
but... i need information posted to my popup that I'll will get in my action. So, struts is involved.
 
Billybob Marshall
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bruno Mendonca:
Hi Billy,
but... i need information posted to my popup that I'll will get in my action. So, struts is involved.


Struts is not 'involved' per se.
Ok, so you're executing a jsp or servlet or whatever, and returning some html page to the client right? And while generating that (dynamic) html, you generate the (dynamic) embedded javascript as well.
 
Bruno Frascino
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Man, i don't got it!
Let me explain better... these are some code
from my JSP page that will call the popup:

from my struts-config.xml:

from my Action LoadPopup:

But, this way will show my page "myPopup.jsp" on the same window, i need a popup, a new window...
I don't know where (in the code) i have to implement this... could you help me?
 
Billybob Marshall
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this:
<html:form action="LoadPopup.do" target="new">
 
Bruno Frascino
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Thanks buddie!! That's it!!
How could i imagine it was simple like that!!
Thanks again!!

 
Think of how dumb the average person is. Mathematically, half of them are EVEN DUMBER. Smart tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic