Overlay & Loader over Popup

Overlay & Loader over Popup

Hi,

I'm using standard JQM POPUP to create a dialog thru ajax call.

Inside ajax call I can easily execute $.mobile.loading( 'show' ); to show overlay and loader before my popup dialog show up.

However, when I execute again $.mobile.loading( 'show' ); on ajax call (button click) on same popup dialog page, only loader appear over the popup page. The overlay is not. This causes problem as I still are able to click any buttons on popup page.

My current only solutions is before I call ajax, I will close the popup $('#popup').popup('close'); and on ajax success, the popup will appear properly. This doesn't look nice as the popup disappeared while waiting ajax.

Is there a way for me to have overlay over popup?

I'm not looking for Page Dialog solutions unless there are no other choices for this popup dialog.

Many thanks in advance.