You could use a javascript function to achieve this..

function Help(document,val) {
window.open('Action.do&_contextId='+val,'win','toolbar=no,location=no,di
rectories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,
height=210,left=0,top=0')
}

In the action retrieve the context id as
request.getParameter("_contextId");
The dispatch logic then resides in the action


Anirudh Jayanth
SysArris Software 
120A, Elephant Rock Road, 
3rd Block, Jayanagar, 
Bangalore - 560011 
Tel: 6655165 / 052 [ ext - 243 ] 
[EMAIL PROTECTED] 


-----Original Message-----
From: Adam Lipscombe [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 29, 2004 5:16 PM
To: 'Struts Users Mailing List'
Subject: NEWBIE - How to submit form and display results in popup window
with no browser decorations.


Folks,


>From browsing the list archive I can see that this sort of questions 
>gets
asked frequently. I looked at the solutions but none seem, to fit my
case:


I am trying to implement a popup window context-sensitive help system
for a struts app.

My solution so far is to have a help button in its own form, and the
form has a hidden "contextID" field. This contextID is stored in the
ActionForm and allows the Action to decide which help screen to display.

This is easy enough do if one just wants a new window (using
target="<WindowName>" in the html:form tag). However the new window has
all the normal browser buttons etc.

e.g.:


 <html:form action="/help" method="POST" target="HelpWindow" >
   <html:hidden property="context" value="homePage" />
    <map name="Map">
      <area shape="rect" coords="2,0,50,13" href="" >
    </map>
  </html:form>


Critically, I want to display the help in a popup window that has no
browser decorations (navigation buttons, text labels  etc). I need to
specify the width and height of the popup.



I looked at Ted Husted's solution "Use Struts JSP Tags to create dynamic
JavaScripts" (http://husted.com/struts/tips/010.htm). 
If I understand this solution correctly, it uses html:rewrite's to call
global forwards that pass parameters to a JSP.  In my case this could
work, but seems to imply that some dispatch logic (i.e. which help page
to display, dependent on the context) resides in the receiving JSP. 
I would rather that the dispatch logic resides in an Action.




How can this be done?


TIA - Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to