my dog learned polymorphism*
The moose likes Struts and the fly likes Struts and Popup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts and Popup" Watch "Struts and Popup" New topic
Author

Struts and Popup

Bruno Frascino
Ranch Hand

Joined: Jul 22, 2003
Posts: 55
Hi there,
how to show a popup when a I click in a button on my page?
tnks!


--BJCK--
Billybob Marshall
Ranch Hand

Joined: Jan 27, 2004
Posts: 202
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

Joined: Jul 22, 2003
Posts: 55
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

Joined: Jan 27, 2004
Posts: 202
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

Joined: Jul 22, 2003
Posts: 55
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

Joined: Jan 27, 2004
Posts: 202
Try this:
<html:form action="LoadPopup.do" target="new">
Bruno Frascino
Ranch Hand

Joined: Jul 22, 2003
Posts: 55


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

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts and Popup
 
Similar Threads
on Action
calling a servlet by clicking a menu?
Popup Window Angst
problem to pass a value in a javascript function with displaytag
Real Popup