views:

33

answers:

1

I would like to replace drop down list (that has on change event that cause ajax update) control while ajax call is being executed with some loading image. Once ajax call is over I would like to restore that drop down with all event handlers intact. Any simple example or pointer would be appreciated. Thanks

A: 

Using jQuery:

savedEl = $('#yourSelectBox');
savedEl.hide().after('<img src="loading.gif" />');

when ajax is done:

savedEl.show().next().remove();
Andrew Kolesnikov