jQuery对话框弹出

I want to have a JQuery jDialog popup screen which needs to be populated after 5 seconds (Say: Response is taking more time than expected as content on pop up screen) and needs to be auto closed once i get the response. I have an AJAX methods in JQuery on which i need to integrate the JDialog screen for deplayed response.

Any leads would be much appreciated.

Thanks

Ajax method have ready states

0: The request is uninitialized (before you've called open()).

1: The request is set up, but not sent (before you've called send()).

2: The request was sent and is in process (you can usually get content headers from the response at this point).

3: The request is in process; often some partial data is available from the response, but the server isn't finished with its response.

4: The response is complete; you can get the server's response and use it.

Using this state you can do it.

Build a pop and call it when ready state "2 & 3", you can use setTimeout(popup(),5000);

ANd destroy that popup on ready state "4"