On Tue, 14 Sep 2004 18:45:47 +0200, Håkon T Sønderland <[EMAIL PROTECTED]> wrote:

> OK, thanks, I think I understood that.
> However, does not this page then stay up there even after the action is
> completed and you go to your result page?
> 
> My problem is that the struts page I'm developing is "embedded" inside
> a webpage (from a publishing system using .net) and I would like to
> display a 'please wait' type of message inside my little frame while
> the stuff is processing (it is a credit scoring application so it takes
> quite a while waiting for web-services and stuff).  Might be possible
> to do what Yves is suggesting, but I'm not up to speed with the treading
> stuff either (disadvantages to being a newbie again).
> 
> Thanks again,

Håkon,

i've actually been trying to do the same thing you're doing; display a
'Processing, Please Wait...' message on form submission.  i'm using
javascript onclick methods on my buttons that show the message and
hide other elements on the page before submitting.  this way only one
page is used and your message is displayed until then response is
returned.  the tricky part is getting to look the way you want it. :)

here's a quick example:

<style type="text/css>
  div#mainPage {
    /* no real need to do anything here at the moment */
  }
  div#processingMsg {
    visibility: hidden;
    /* set your fonts and stuff as well */
  }
</style>

<script language="javascript" type="text/javascript" >
  function process() {
    document.all.mainPage.style.visibility = "hidden";
    document.all.processingMsg.style.visibility = "visible";
    document.forms[0].action = /* what ever action you want... */
    document.forms[0].submit;
    return;
  }
</script>

and then in your body you wrap the main content with:

<div id="mainPage">
  /* content goes here... */
</div>

and you can put your message at either the top or bottom:

<div id="processingMsg">
  Processing, Please Wait...
</div>

you'll have to play with layout a bit to get things looking correct.  
when you submit just be sure to call your onclick="process();" or
onchange="process();" function and you should be all set.

HTH
:)

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

Reply via email to