473,624 Members | 2,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"please wait" type page without javascript?

Hi all,

I have database actions that will potentially take several seconds to
complete.

My normal page uses AJAX so keeping the user informed of what is
happening is not a problem.

However, the page also has fallback code in case of no Javascript. In
this case I would like to display temporary "please wait" type page
whilst the DB search is taking place.

I originally thought I would serve up the wait page, and then use meta
refresh to immediately request the page that actually does the search.
That way the wait page would be displayed as long as the search took
to complete and markup was returned to the browser.

However, on reading up about meta refresh, it appears this is now
depreciated, and is frowned upon anyway as it messes up the Back
button.

So, do I?
1) Do it anyway
2) Forget the waiting page, and just load the search page direct
3) Use some other friendlier method to keep the user informed (Not
that I can think of any)

Cheers,
Jeremy
Feb 16 '08 #1
5 3229
Hi,

You can have a warning for restricted browsers if it's say under 10
seconds or so:

<noscript>
<p style="color: red;">Warning: This operation may take several
seconds. Please do not
close your web browser during this operation. Note: Enable
JavaScript
to remove this warning.</h1>
</noscript>

Regarding the back button, some browsers will skip over the meta
refresh page when traversing the history so in that case it wouldn't
be a problem. Even if that doesn't happen, if the refresh interval
isn't too short, the user will still be able to go back without much
difficulty.

On Feb 16, 6:48 pm, Jer...@thebunny shed.co.uk wrote:
Hi all,

I have database actions that will potentially take several seconds to
complete.

My normal page uses AJAX so keeping the user informed of what is
happening is not a problem.

However, the page also has fallback code in case of no Javascript. In
this case I would like to display temporary "please wait" type page
whilst the DB search is taking place.

I originally thought I would serve up the wait page, and then use meta
refresh to immediately request the page that actually does the search.
That way the wait page would be displayed as long as the search took
to complete and markup was returned to the browser.

However, on reading up about meta refresh, it appears this is now
depreciated, and is frowned upon anyway as it messes up the Back
button.

So, do I?
1) Do it anyway
2) Forget the waiting page, and just load the search page direct
3) Use some other friendlier method to keep the user informed (Not
that I can think of any)

Cheers,
Jeremy
Feb 17 '08 #2
..oO(Je****@the bunnyshed.co.uk )
>I have database actions that will potentially take several seconds to
complete.

My normal page uses AJAX so keeping the user informed of what is
happening is not a problem.

However, the page also has fallback code in case of no Javascript. In
this case I would like to display temporary "please wait" type page
whilst the DB search is taking place.

I originally thought I would serve up the wait page, and then use meta
refresh to immediately request the page that actually does the search.
That way the wait page would be displayed as long as the search took
to complete and markup was returned to the browser.

However, on reading up about meta refresh, it appears this is now
depreciated, and is frowned upon anyway as it messes up the Back
button.
It's not deprecated and most likely never will, because it has its valid
uses. The reason why it's usually frowned upon is that it's abused for
redirects too often, which is ugly enough on its own (redirects should
be done with proper HTTP headers), but becomes even worse if it's done
immediately with no delay. This breaks the back button.

But it's perfectly fine if used for what it was intended - to _refresh_
a page after a certain amount of time. This could be a live ticker for
example, which refreshes every 30s, or also a page reporting the status
of a currently running server process like in your case. IMHO there's
nothing wrong with that. Just don't refresh every 2 seconds, there
should be a bit more time. At least 10s IMHO, which is still good and
accurate enough for a fallback.

Micha
Feb 17 '08 #3
But it's perfectly fine if used for what it was intended - to _refresh_
a page after a certain amount of time. This could be a live ticker for
example, which refreshes every 30s, or also a page reporting the status
of a currently running server process like in your case. IMHO there's
nothing wrong with that. Just don't refresh every 2 seconds, there
should be a bit more time. At least 10s IMHO, which is still good and
accurate enough for a fallback.
I think you misunderstand my intent. The meta refresh would be used to
open a new page immediately and once only.
ie:
.. Display wait page which contains immediate meta refresh
.. Browser honours meta refresh and requests search results
.. wait page is still displayed while search in progress, since no
markup has yet been returned from server.
.. Search finishes and page is displayed.

I guess I could stick in a 1 second delay to help preserve the back
button, but this is getting ugly IMO. It forces a 1 second wait even
if the search is instantaneous.
I have been wondering whether it would be possible to scrap the
seperate wait page, and just have the search page return some "please
wait" markup immediately, and then have the eventual result markup
hide the wait markup using CSS? Anyone tried this?
Feb 17 '08 #4
On Feb 17, 1:48 am, Jer...@thebunny shed.co.uk wrote:
Hi all,

I have database actions that will potentially take several seconds to
complete.

My normal page uses AJAX so keeping the user informed of what is
happening is not a problem.

However, the page also has fallback code in case of no Javascript. In
this case I would like to display temporary "please wait" type page
whilst the DB search is taking place.

I originally thought I would serve up the wait page, and then use meta
refresh to immediately request the page that actually does the search.
That way the wait page would be displayed as long as the search took
to complete and markup was returned to the browser.

However, on reading up about meta refresh, it appears this is now
depreciated, and is frowned upon anyway as it messes up the Back
button.

So, do I?
1) Do it anyway
2) Forget the waiting page, and just load the search page direct
3) Use some other friendlier method to keep the user informed (Not
that I can think of any)

Cheers,
Jeremy
If AJAX has an essential function in your code, you should control
user agent "get_browser(nu ll,true);" if [javascript] =1 i think you
might reject the client request and demand javascript activation...
Feb 17 '08 #5
On Feb 17, 1:48 am, Jer...@thebunny shed.co.uk wrote:
Hi all,

I have database actions that will potentially take several seconds to
complete.

My normal page uses AJAX so keeping the user informed of what is
happening is not a problem.

However, the page also has fallback code in case of no Javascript. In
this case I would like to display temporary "please wait" type page
whilst the DB search is taking place.

I originally thought I would serve up the wait page, and then use meta
refresh to immediately request the page that actually does the search.
That way the wait page would be displayed as long as the search took
to complete and markup was returned to the browser.

However, on reading up about meta refresh, it appears this is now
depreciated, and is frowned upon anyway as it messes up the Back
button.

So, do I?
1) Do it anyway
2) Forget the waiting page, and just load the search page direct
3) Use some other friendlier method to keep the user informed (Not
that I can think of any)

Cheers,
Jeremy
<meta http-equiv='refresh' content='10' Refreshes the page after 10
seconds ;)

<?php
..
...
....
if(isset($_SESS ION['redirect_time']))
{
$_SESSION['redirect_time']=0;
echo "<meta http-equiv='refresh' content='10'>";
$_SESSION['redirect_time']++;
}
else if($_SESSION['redirect_time']>0)
{?>window.redir ect("go.html");
<?php}
?>
Feb 17 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
13469
by: Kannan | last post by:
Hello, I have a requirement that specifies that I display a "Please Wait..." window (preferably modal) along with a gif that mimics a progress bar during a save operation. The dialog needs to be closed at the end of the operation. How do I go about this... Issues are: 1. I believe a showModaldialog would stop all back ground processing and shift control to the modal dialog. 2. I would like to close the dialog from the parent window...
1
1011
by: metsymani | last post by:
In my web application, I have a search screen coded in ASP.Net. The Search process takes lot of time. So, I need to show a wait page informing the user that "Search is in progress. Please wait" along with an animated gif. I have placed a div in the search page which contains the message and animated gif. I hide the div by making "display: none" in the onload function of the body tag. On click of the Search button(type = Submit), I call a...
3
4626
by: John Dalberg | last post by:
Hi I have a form that opens a new window for the results. Because the results might take a few seconds due to server processing, I would like to display a message "please wait" in the new window, erase that message when the processing is done and show the results. How is this done? John Dalberg
9
3327
by: John Walker | last post by:
Hi, I have a datagrid with a radiobutton template column, with AutoPostBack set to TRUE. When the user clicks on a radiobutton the application will PostBack, and in the PostBack there will be certain logic performed, and the dataview will be re-binded to the datagrid. There turns out to be about 2-5 seconds delay between the time the user clicks the radiobutton and when the page is completely re-loaded. During this time the user may try...
4
2652
by: louvino | last post by:
Hi, I have some links. When I click on one, a window opens but during the loading of this window, I would like the cursor is in state "wait" (using CSS : cursor : wait; ) Help me :-)
2
5346
by: =?Utf-8?B?Z2VvZmZh?= | last post by:
I cannot figure this out and would appreciate any help..... I have a datagrid view that displays the results from a Stored Procedure. it can take awhile to load..... the stored procedure fires when a Calendar is clicked. ( a date is part of the stored procedure ) How can i just show a new page or a pop-up that says "please wait" until the stored procedure has run and gotten all the data and the page is completely loaded? In all the...
3
5163
by: =?ISO-8859-1?B?Rvpsdmlv?= | last post by:
Hello all, My application delay some minutes when I press a button(it's doing some working ). How can I put a message: "Please wating" during this delay? It is important that after the execution finish this message disappear. Fúlvio
1
2359
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, I have a webpage designed with asp.net 2.0. Is there a way to display a "please wait" message to the screen horizontally centered and veritcally 20px from the VISIBLE top of the page, regardless of what kind of scrolling the user has done? I am currently displaying a "please wait" message (the DIV section shown below, which i'm showing/hiding) when the user clicks save, but the user is
1
5670
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Mister, any solution about it ? any sample code please ?? thanks in advance
0
8251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8182
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8688
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8352
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2614
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.