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?
Brian 3 1555
On Thu, 16 Nov 2006 22:40:08 GMT, "Brian" <no*@given.comwrote:
>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/
--
best regards,
Martin Mouritzen. http://www.siteloom.dk
Martin Mouritzen wrote:
On Thu, 16 Nov 2006 22:40:08 GMT, "Brian" <no*@given.comwrote:
>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
"J.O. Aho" <us**@example.netwrote in message
news:4s************@mid.individual.net...
Martin Mouritzen wrote:
>On Thu, 16 Nov 2006 22:40:08 GMT, "Brian" <no*@given.comwrote:
>>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 :)
Brian This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Headless |
last post by:
I've marked up song lyrics with the <pre> tag because it seems the most
appropriate type of markup for the type of data. This results in
inefficient use of horizontal space due to UA's default...
|
by: Alan Illeman |
last post by:
How do I set several different properties for PRE in
a CSS stylesheet, rather than resorting to this:
<BODY>
<PRE STYLE="font-family:monospace;
font-size:0.95em;
width:40%;
border:red 2px...
|
by: Buck Turgidson |
last post by:
I want to have a css with 2 PRE styles, one bold with large font, and
another non-bold and smaller font.
I am new to CSS (and not exactly an expert in HTML, for that matter). Is
there a way to...
|
by: Michael Shell |
last post by:
Greetings,
Consider the XHTML document attached at the end of this post.
When viewed under Firefox 1.0.5 on Linux, highlighting
and pasting (into a text editor) the <pre> tag listing will...
|
by: Jarno Suni not |
last post by:
It seems to be invalid in HTML 4.01, but valid in XHTML 1.0. Why is there the difference? Can that pose a problem when such a XHTML document is served as text/html?
|
by: Rocky Moore |
last post by:
I have a web site called HintsAndTips.com. On this site people post tips
using a very simply webform with a multi line TextBox for inputing the tip
text. This text is encode to HTML so that no...
|
by: Eric Lindsay |
last post by:
I can't figure how to best display little snippets of shell script using
<pre>. I just got around to organising to bulk validate some of my web
pages, and one of the problems occurs with Bash...
|
by: Xah Lee |
last post by:
The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully
Functional Notations
Xah Lee, 2006-03-15
Let me summarize: The LISP notation, is a functional notation, and is
not a...
|
by: Schraalhans Keukenmeester |
last post by:
I am building a default sheet for my linux-related pages.
Since many linux users still rely on/prefer viewing textmode and
unstyled content I try to stick to the correct html tags to pertain good...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |