Skip to main content

Synchronous execution of jMaki.doAjax()

2 replies [Last post]
kjambor
Offline
Joined: 2004-04-19
Points: 0

Hi,

I am using doAjax() call in the onLoad() method of my form to initialize the values of my jMaki widgets on the form. However, sometimes the form shows up with the uninitialized widgets and a fraction of a second later the widgets start showing their values.

Is there are way to force synchronous execution of doAjax()? I would like the form to show up only when all the widgets have been initialized.

Regards,

-- Kamyar

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi,

As one of the properties on the doAjax add:

asynchronous : false

The default is true.

The callback is still called and the onerror should also fire just like they would do in the asynchronous case if an error occurs.

-Greg

kjambor
Offline
Joined: 2004-04-19
Points: 0

Hi Greg,

Thanks. It works exactly as expected when asynchronous parameter is set to false.
I also see the benefit of doing things asynchronously. If I figure out how to show a "Loading..." animated widget, while the widgets on the form are loading their data, I will switch back to asynchronous.

I must say, the more I use jMaki, the more I like it.

Thanks,

-- Kamyar