Can you give us more detail on what exactly you want to do?

What I think you want to do (based on the info you gave) is open a new
window to one of your action mappings ....correct?


--------------

<not-quite-optimal>
this example has /logon.do and logoff.do hard-coded in the script
</not-quite-optimal>

--------------

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<Title>Testing</Title>
<BODY>

<html:link href="JavaScript:openWindow('mywindow', 'logon.do', 500, 500,
0)">
Click me to login
</html:link>
<br>
<html:link href="JavaScript:openWindow('mywindow', 'logoff.do', 500, 500,
0)">
Log Out
</html:link>


<SCRIPT LANGUAGE=javascript>
<!--

function openWindow(name, url, width, height, x) {

args="width="+width+",height="+height+",resizable=yes,scrollbars=yes,status=
0";
  remote=window.open(url,name,args);
  if (remote != null) {
    if (remote.opener == null)
      remote.opener = self;
  }
  if (x == 1) {
        return remote;
  }
}

//-->
</SCRIPT>


</BODY>
</HTML>








> -----Original Message-----
> From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 29, 2002 4:22 PM
> To: Struts Users Mailing List
> Subject: RE: Popup Windows
>
>
> what I have done is forwarding to a jsp page that opens a new
> window and self-close.
> It uses javaScript though.
>
> //struts-config.xml
> ================================================================
>     <!-- Process a user logon -->
>     <action path="/logon_client"
>             type="com.client.logon.LogonAction"
>             name="logonForm"
>             scope="request"
>               validate="true"
>             input="/logon_client.jsp">
>       <forward name="success" path="/logon_client_succ.jsp"/>
>     </action>
> ================================================================
>
> // logon_client_succ.jsp
> ================================================================
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <html>
> <head>
>       <title>Login</title>
>       <link rel="STYLESHEET" type="text/css" href="/css/wms.css">
> </head>
>
> <body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" >
> <script language="JavaScript" type="text/javascript">
> <!--
>
> window.opener.newWindow('/netWorth.do','MainWindow',1,1,1,1,1,1,77
> 7,460,100,100);
>     self.close();
> //--></script>
> </body>
> </html>
> ================================================================
>
>
> -----Original Message-----
> From: Villegas, Courtney [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 29, 2002 4:16 PM
> To: 'Struts Users Mailing List'
> Subject: Popup Windows
>
>
> I am new to Struts usage and am trying to determine if it is possible to
> open a new browser window (an control its appearance) via an actionforward
> method.
>
> I realize that the Action itself has no idea of the front end (the
> HTML/Javascript pages), but I am only familiar with opening new window and
> changing their appearance in Javascript.  Is there a way to do
> this without
> Javascript?  I have contemplated using the <body:onload> in my
> jsp page, but
> have found no way to manipulate the window once it is open (I am
> working in
> IE 5.0).
>
> Any help would be greatly appreciated.
>
> Thanks
> Courtney Villegas
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>


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

Reply via email to