Re: pre-loader



On Thu, 16 Nov 2006 22:40:08 GMT, "Brian" <not@xxxxxxxxx> wrote:

Hi there

I'm not sure if this is a PHP or a Javascript problem, so sorry for the
cross post

I have a PHP page that talks to a MySQL page, i want to put in a
"loading" message.
I have tied to use a layer and using a showlayer at the top of the
page and hide
at the bottom, but it does not work, it still waits for the PHP to run.

I know it can be done, as i have seen it, how do they do that?

It seems like you're on the right track.

A common reason why it won't work is if you have mod_gzip enabled. You
can disable mod_gzip for a specific folder by having this in your
.htaccess

<IfModule mod_gzip.c>
mod_gzip_on Off
</IfModule>

You can see an example I made for a loading screen here:
http://siteloom.dk/~martin/loading/

usage of mod_gzip is quite small nowadays and I don't think it's the
problem but the flushing of the output buffer in php.

Use ob_flush() to get out the data you want

<?php
/* header stuff and such */
...
/* head of HTML */
...
/* div for the waiting message */
...
/* javascript to enable div */
...
ob_flush();
/* do what you need to do with the mysql */
...
/* generate the rest of the page */
...
ob_end_flush();
?>

That could work for you, but I won't guarantee it will.


//Aho



Thanks for your help guys, i will have a play and see what happens :)



Nope, still wouldn't work, never mind worth a try, thnaks for your help guys

Brian


.



Relevant Pages

  • Re: [PHP] Loop problem
    ... I think this is a 1/2 PHP problem and 1/2 Javascript problem. ... > 1 - If the result is not empty it will loop through the results. ...
    (php.general)
  • Loop problem
    ... I think this is a 1/2 PHP problem and 1/2 Javascript problem. ... - If the result is not empty it will loop through the results. ... - If the loop returns multiple records, the "alert" does not return the ...
    (php.general)
  • Re: HELP - please with populating form text box.
    ... > and in standard HTML and javascript, however, once the PHP ... It doesn't work with PHP ... It means you have an error in outputting the desired format in PHP, ... javascript problem. ...
    (comp.lang.php)
  • Re: Dealing with PHP Files
    ... Dudley Henriques wrote: ... You can save any web page in Firefox, Command + S. If a web page has a .php ending this just means that the document that was loaded to the server had php code in it that he wanted parsed. ... The .php ending lets the server know to parse the php code in it There are other ways too). ... make a folder and put in the .php file and the folder with the images and maybe other things that FF made. ...
    (comp.sys.mac.apps)
  • Re: Dealing with PHP Files
    ... You can save any web page in Firefox, Command + S. If a web page has a .php ending this just means that the document that was loaded to the server had php code in it that he wanted parsed. ... The .php ending lets the server know to parse the php code in it There are other ways too). ... If you go the source of the webpage via your browser, you will just see a text file with html mark up. ... make a folder and put in the .php file and the folder with the images and maybe other things that FF made. ...
    (comp.sys.mac.apps)