How do I display an animated gif to show the app as 'busy'

I’m trying to figure out a way to display a simple animated gif when the user presses the ‘search’ button.

I placed a gif on my form and hide it via the onShow event of the form.

In the method that is invoked when the user presses the ‘search’ button the first line of code unhides the gif - the last line of code in the method hides the gif once again.

The problem is that the gif never shows up.

code in the ‘search’ method…

function doCustomQuery()
{
  //showPleaseWait();
  showBusyBar();
  
  var sqlstring = ""+
  "select distinct seis_set_id from seis_set a "+
  "where a.seis_set_type = 'SEIS_LINE' ";

  var sqlstring1 = '';
...
  hideBusyBar();
}

The showBusyBar() and hideBusyBar() methods are really simple…

function showBusyBar()
{
  elements.busyBar.visible = true;
  application.updateUI();
}

function hideBusyBar()
{
  elements.busyBar.visible = false;
  application.updateUI();
}

Is there a way to do this ?

This is a web-client deployment scenario and not Smart client.

Thanks in advance
Mark

Hi,

did you find a way to do this ??

Regards,

Just a thought, have you examined the frameworks_busy.jar from Data-Mosaic?

Hi Mark,

If you test this in smart client, it should work fine (might need to call application.updateUI());

However this will not have the desired effect in Web Client.
The reason is that the Web Client is a request/response.
The show and hide of the image all happens a single round-trip, in the same server thread before the response is sent back to the browser.
Therefore, the last state of the client (the image is hidden again) is what is rendered. Make sense?

So this is pretty difficult without changing the design of the ajax layer…