--- On Tue, 10/7/08, Sulabha Walavalkar wrote:
> I have a requirement as - on click of submit button call
> should be made to database to check if any batch processes 
> are running or not.
> 
> If any batch process is running then a message should be
> displayed on the same screen else the data should be displayed 
> in new window.
> 
> Since I am using tiles and layout.jsp page, <body>
> tag contains in layout.jsp.  How can I check the value set 
> by action class in javascript function on onLoad event and 
> then decide whether to open new window or stay on the same screen?

Personally I'd use Ajax to solve this, as a static version wouldn't be 
particularly accurate.

A trivial solution would be to set a JavaScript variable to the value of some 
action variable; this is done inside a JSP:

<script>
  var foo = <s:property value="isBatchRunning"/>;
  function checkOnSubmit() {
      if (foo) {
          // When running
      } else {
          // Not running
      }
  }
</script>

Dave

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

Reply via email to