R.Wieser kirjutas Neljapäev, 18. august 2016 kl 19:58:18 UTC+3:
Jerry,
Rudy, what you are suggesting works in most browsers.
But beware that it is browser dependent (including browser
version)
Alas, that (small differences) is always a problem with browsers. :-\
It's also dependent on the HTML being sent; i.e. a
<table> without the matching </table> seems to fail to
display more than non <table> data.
Thats something I've seen too.
But agreed, its something the OP should be aware of.
Regards,
Rudy Wieser
-- Origional message:
Jerry Stuckle <[email protected]> schreef in berichtnieuws np4nc0$oui$[email protected]...
On 8/17/2016 2:30 AM, R.Wieser wrote:
apoorv(?),
I want to show a loading gif or a message that please wait and
when I get result I want to show that.
I know we cab do that when we submit a form with beforesend
function or show hide a gif but how would I do that with
file_get_contents.
I'm not sure I understand the problem: you could place/echo some HTML
before
executing the file_get_contents command, and that HTML should be
displayed
on the clients webbrowser (it will display as much as it can, even when
it
hasn't encountered the "</BODY>" and or "</HTML>" tags yet).
<?php
echo "<h3>Loading data, please wait</h3>";
$contents = file_get_contents(....);
echo "<h3>Finished loading, now processing data</h3>";
// do something with $contents here
(untested, but should work)
Hope that helps.
Rudy Wieser
Rudy, what you are suggesting works in most browsers. But beware that
it is browser dependent (including browser version) and won't
necessarily work in all cases. It's also dependent on the HTML being
sent; i.e. a <table> without the matching </table> seems to fail to display more than non <table> data.
But it varies widely.
--
==================
Remove the "x" from my email address
Jerry Stuckle
[email protected]
==================
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
ʕʘ̅͜ʘ̅ʔ
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)