Thanks, that's simple and works.

I seemed to have jumped in the deep end with all this stuff and I'm on a steep 
learning curve...

On Wednesday 12 July 2006 15:20, Samere, Adam J wrote:
> Since you are using Ajax, the returned value is not going to cause the
> browser to navigate to a new page. You can parse the returned value and
> manually direct the browser to a new page by setting the document
> location.
>
> // check status of ajax request, parse data
> If not done
>   ... Do nothing
> If success
>   document.location = "mysuccessAction"
> Else
>   document.location = "myerrorAction"
>
> -Adam
>
> -----Original Message-----
> From: Paul McMahon [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 12, 2006 10:14 AM
> To: Struts Users Mailing List
> Subject: Detection of process complete
>
> I am having problems getting an action to detect when an external
> process is complete.
>
> I have a "navigation" action class that kicks off the process and then
> directs browser to a progress .jsp page.  redirect="false" so control
> stays with the navigation class.
>
> The progress .jsp page uses AJAX techniques to display ongoing progress,
> by calling a "progress" URL that returns progress fields in XML to fill
> in the progress .jsp page. The progress URL is mapped by Struts to a
> progress action class/form to do this work.
>
> The "progress" action returns "success" or "fail" mapping when the
> process is complete. I expect this to go to a summary page as shown in
> struts config below, but the browser stays on the progress page.
>
> Here are my action mappings:
>      <action
>         path="/RecoveryNavigation"
>         type="com.plasmon.appliance.action.RecoveryNavigationAction"
>         scope="session"
>         name="RecoveryNavigationForm"
>         validate="false">
>
>          <forward name="nosession" path="/Logout.do" redirect="true" />
>          <forward name="archives_exist"
> path="/appliance/recovery/Options.jsp"
> redirect="false"/>
>          <forward name="clean_system"
> path="/appliance/recovery/CleanOptions.jsp" redirect="false"/>
>          <forward name="progress"
> path="/appliance/recovery/Progress.jsp"
> redirect="false"/>
>          <forward name="cancel" path="/Summary.do" redirect="true"/>
>          <forward name="success" path="/Summary.do" redirect="true"/>
>          <forward name="fail" path="/Summary.do" redirect="true"/>
>
>      </action>
>
> Note this action is only "called" from within AJAX javascript in the
> Progress.jsp page:
>
>      <action
>         input="/appliance/recovery/Progress.jsp"
>         name="RecoveryProgressForm"
>         path="/RecoveryProgress"
>         scope="session"
>         type="com.plasmon.appliance.action.RecoveryProgressAction"
>         validate="false">
>
>          <forward name="success" path="/Summary.do" redirect="true"/>
>          <forward name="fail" path="/Summary.do" redirect="true"/>
>      </action>
>
> When RecoveryProgressAction returns mapping "success" or "fail" I would
> expect redirection to Summary page but this is not happening.
>
> Any ideas?
>
> --
> -Paul McMahon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -----------------------------------------
> The information contained in this message may be privileged,
> confidential, and protected from disclosure. If the reader of this
> message is not the intended recipient, or any employee or agent
> responsible for delivering this message to the intended recipient,
> you are hereby notified that any dissemination, distribution, or
> copying of this communication is strictly prohibited. If you have
> received this communication in error, please notify us immediately
> by replying to the message and deleting it from your computer.
>
> Thank you. Paychex, Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
-Paul McMahon
-01763 261 466 ext 569

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

Reply via email to