I am updating 100,000 records. So the page looks blank while the update query process runs on the backend. Can someone tell me how to display the text "Please wait blah blah" until the update ends?
Asked
Active
Viewed 73 times
-3
-
2Quick note: "lak" isn't a very well understood term outside India and a few other countries. On an international site like this, it's generally better to say "100,000 records". – Jon Skeet Oct 01 '11 at 08:39
-
You title says 'Ajax', but it seems you don't use it in this case. Have you tried? – GolezTrol Oct 01 '11 at 08:42
-
If you could post some code we could help, supposing you use jQuery you could just change the `.html()` of something before you make the call. – Kokos Oct 01 '11 at 08:44
-
No Golez i just want to know how to achieve the things using ajax. a sample code might be very usefull for me. – Hariram Nandagopal Oct 01 '11 at 08:44
-
Hi Kokos....i just did the things using JS and PHP alone so it shows the blank screen as expected while updating...since it has to be updated for more than 1,00,000.... so in mean while i wanted to display the message as "Please wait updation in progess blah blah" so that the users could understand abt the goings. – Hariram Nandagopal Oct 01 '11 at 08:47
1 Answers
1
Well depending on your script and the structure, the easiest way would be to change a div's css property called display. When a user clicks on a link that starts the php script, you could add a javascript code like :
$(#+THEIDOFYOURDIV).show("slow");
});
and once its done, you can call another js function to close it like :
$(#+THEIDOFYOURDIV).hide("slow");
});
*NOTE I am using jquery functions, so you would need to include jquery in your pages.
There is another way you could do this using php ONLY, I had the same issue so take a look at this: how to show results while a php script is still running
-
Thanks for your comment ahoura... i just placed a icon and updating the records using php by js functin (onclick) event... – Hariram Nandagopal Oct 01 '11 at 08:55