Reply to Re: howto: please wait, this may take a few seconds...

Your name:

Reply:


Posted by Chung Leong on 09/28/39 11:27

There are a number of ways to do an asynchronous look up through
Javascript. If you need something sophisticated, Google the web for
AJAX libraries.

A simple, cross-browser technique I've used before involves using
setInterval() to periodically call a function, which then dynamically
creates a <SCRIPT> tag linking in a PHP-generated script file. This
script file would contain just a call to a function already defined,
passing updated information from the server as parameter.

You could also do it without Javascript. Just print out a message,
perform the time-consuming task, then output a CSS style retroactively
to turn off the message.

Example:

<div id="test">
please wait, this may take a few seconds...
</div>
<?

// time consuming task

?>
<style>

#test {
display: none;
}

</style>

The trick here is in keeping the browser from timing out and proper
buffer flushing.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация