johnyp Posted July 23, 2012 Share Posted July 23, 2012 Hello again. I have a popup window that executes a function in opener window and closes. Now my question is how to pop a "Please wait while loading..." message until the opener window finish loading? The function i execute in opener window is just an sql query to show some results. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/266145-please-wait-loading/ Share on other sites More sharing options...
.josh Posted July 24, 2012 Share Posted July 24, 2012 sounds like you are making an ajax call. Right before the ajax call, show your msg. append a div with a high z-index or something, I don't know how the rest of your site looks.. and then in the success callback function where you get the results, remove the div. Quote Link to comment https://forums.phpfreaks.com/topic/266145-please-wait-loading/#findComment-1363912 Share on other sites More sharing options...
peipst9lker Posted July 24, 2012 Share Posted July 24, 2012 If you're using jQuery.ajax() you can use beforeSend, success and error options. $.ajax({ url: "target.php", beforeSend: function () { // show "Please wait"-popup }, success: function (a) { /* ... */ }, error: function () { /* ... */} }) Quote Link to comment https://forums.phpfreaks.com/topic/266145-please-wait-loading/#findComment-1363951 Share on other sites More sharing options...
johnyp Posted July 24, 2012 Author Share Posted July 24, 2012 Thank you all a made a div and solved the issue. Quote Link to comment https://forums.phpfreaks.com/topic/266145-please-wait-loading/#findComment-1363979 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.