ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

How to close Popup and start processing next line of event

Thiru
1 Mar 2010 04:33:03 GMT
1 Mar 2010 04:33:03 GMT

Hi All,
I have used a popup which contains set of divs,
on click of any div, onClick event will be called.

see the following code
/* sample code */
menuItemDiv.addEventListener("onClick", new EventListener() {
public void onEvent(Event event) throws Exception {
menuId.close();
Events.postEvent("onAddTab",moduleName);
}
});

here i am trying to close the popup (menuId.close(); )
but the popup is getting closed once the entire event execution is completed. means

to execute the below statement
" Events.postEvent("onAddTab",moduleName); " will take 10 seconds, until this line execution completes, the popup is not getting closed.

My problem is, i want to close popup on click it self ( in one or two seconds).

please help me to achieve the above task

Thanks
Thiru

jumperchen
2 Mar 2010 04:47:49 GMT
2 Mar 2010 04:47:49 GMT

Please refer to the echoEvent article.