Hi Abraham and Pete!

Thanks for your help! The problem is  - I don´t use a link directly from my
jsp page to reach this new window. I have two submit buttons on my jsp-page,
Save and Insert Address . The form:action on the jsp-page is:

<html:form action="/saveComposeMessageAction.do?action=Save">

in Struts-Config.xml this action looks like this:
<!-- Save compose message -->
   <action  path="/saveComposeMessage"
            type="com.appium.UM.Control.Web.Mail.SaveComposeMessageAction"
            name="composeMessageForm"
            scope="session"
            validate="false">
      <forward name="success"  path="/ComposeMessage.jsp?action=Create"/>
      <forward name="success2" path="/viewInsertAddress.do?action=Insert"/>
      <forward name="failure"  path="/ErrorLDAP.jsp"/>
      <forward name="failure2" path="/ComposeMessage.jsp"/>
   </action>

If i click on the submit button InsertAddress, saveComposeAction is the
first action. From the action class I check if Insert Address was the button
the user clicked on, if this is the case I return success2 and the path is:

    path="/viewInsertAddress.do?action=Insert"/>

The action in struts_config.xml looks like this:

<!-- View insert address-->
   <action  path="/viewInsertAddress"
            type="com.appium.UM.Control.Web.Mail.ViewInsertAddressAction"
            name="insertAddressForm"
            scope="session"
            validate="false">
      <forward name="success"    path="/InsertAddress.jsp"/>
      <forward name="failure"    path="/ErrorLDAP.jsp"/>
   </action>

>From this class I return success and the path is :

    path="/InsertAddress.jsp"/>

As it is now InsertAddress.jsp is onpened in the same window as the first
jsp-page but a want a new window!! Where do I enter this information and
how??
Any suggestions???

Thank you in advance!

/lLinnéa



----- Original Message -----
From: "Peter Alfors" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 14, 2001 3:57 PM
Subject: Re: struts-config.xml - How do I open a "success" path as a new
window???


> Your javascript code looks correct.  :)
>
> However, if at all possible, I would avoid using javascript.  Basically,
> because the user may have javascript turned off in their browser.
>
> Pete
>
> Abraham Kang wrote:
>
> > Hi Linnea,  I think it would be easier to use<a class="leftnav"
> > href="javascript:window.open('yourAction.do','windowName',
> > 'status=no')">Your action will return mapping.findForward("success")
> > to load the popup windows contents.Pete,  my javascript is rusty so if
> > you see any errors please correct.--Abraham
> >
> >      -----Original Message-----
> >      From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
> >      Sent: Wednesday, June 13, 2001 1:52 AM
> >      To: [EMAIL PROTECTED]
> >      Subject: struts-config.xml - How do I open a "success" path
> >      as a new window???
> >
> >      Hi!!
> >
> >      I want to my path
> >
> >          <forward name="success" path="/InsertAddress.jsp"/>
> >
> >      to open the jsp-page as a new window/page ( like the html
> >      tag
> >
> >      <td align="left"><a class="leftnav" href="http://...../";
> >      target="_blank"><bean:message key="icon.calendar"/></td> )
> >
> >      Any ideas how to do this with struts???
> >
> >      Thanks / Linnéa
> >
> >
> >
>

Reply via email to