Hello,
I attended a seminar with scott gu. Microsoft asp.net lead guru, and he
mentioned some advanced
javascript that let you display an animation while your page is waiting for
response from the server.
He said these scripts could be found on his blog but , so far i have not
been able to find them.
I did send him an e-mail but no luck, no response.
Does anyone know of these script or know how to do this?
Many thanks in advance
JB 5 9012
Try this:
<html>
<head>
<title></title>
<script language="javas cript">
function toggle(e) {
if (e.style.displa y == "none") {
e.style.display = "";
} else {
e.style.display = "none";
}
}
</script>
</head>
<body onload="toggle( progress)">
<div id="progress">A nimation/Text/What Ever Here</div>
</body>
</html>
Hope that helps.
Simon.
> } } </script> </head> <body onload="toggle( progress)"> <div id="progress">A nimation/Text/What Ever Here</div> </body> </html>
Hope that helps.
Simon.
Great,
Thank you
JB
> </script> </head> <body onload="toggle( progress)"> <div id="progress">A nimation/Text/What Ever Here</div> </body> </html>
Hope that helps.
Simon.
How should this be used in an aspx page?
In your example, shouldn't it display "Animation/Text/What Ever Here" until
the page i rendered?
This is not what happens in my case. I still see white background while page
is loading.
JB,
Instead of having the user call the slow-loading page directly, you
will need to create an intermediate page. You pass the URL (with
querystring) of the slow-loading page to the intermediate page, which
in turn calls the slow-loading page using javascript. In the interim,
it does something (shows "progress bar", message or animation).
I have attached some example script which should help you. The initial
calling page is called orderstart.aspx . The intermediate page is
pageload.aspx and the slow-loading page is called ordercomplete.a spx
(not shown here directly). This code is from an asp.net "Black belt"
presentation by INETA.
Bill E.
Hollywood, FL
_______________ _______________ __
orderstart.aspx .vb
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Server.Transfer ("PageLoad.aspx ?Page=ordercomp lete.aspx?partn umber=" &
TextBox1.Text, True)
End Sub
_______________ _______________ __
pageload.aspx
<HTML>
<HEAD>
<title>PageLoad </title>
<script language="javas cript">
var iLoopCounter = 1;
var iMaxLoop = 6;
var iIntervalId;
function BeginPageLoad() {
location.href = "<%= Request.QuerySt ring("Page")%>" ;
iIntervalId =
window.setInter val("iLoopCount er=UpdateProgre ssMeter(iLoopCo unter,
iMaxLoop)", 500);
}
function EndPageLoad() {
window.clearInt erval(iInterval Id);
ProgressMeter.i nnerText = "Page Loaded -- Not Transferring";
}
function UpdateProgressM eter(iCurrentLo opCounter, iMaximumLoops) {
iCurrentLoopCou nter += 1;
if (iCurrentLoopCo unter <= iMaximumLoops) {
ProgressMeter.i nnerText += ".";
return iCurrentLoopCou nter;
}
else {
ProgressMeter.i nnerText = "";
return 1;
}
}
</script>
</HEAD>
<body onload="BeginPa geLoad()" onunload="EndPa geLoad()">
<form id="Form1" method="post" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="99%"
height="99%" align="center"
valign="middle" >
<tr>
<td align="center" valign="middle" >
<font color="navy" size="7">
<span id="MessageText ">Processin g Order -- Please
Wait</span>
<span id="ProgressMet er"
style="WIDTH:25 px;TEXT-ALIGN:left"></span>
</font>
</td>
</tr>
</table>
</form>
</body>
</HTML> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brainless |
last post by:
hi...
I've recently created a dhtml thing on http://www.shapers.nl/ that
animates a lot of images. The thing I want to solve is the lag that
occurs when a new animation is initiated.
To make it time-based I calculate the entire animation on beforehand
and create numerous setTimeOuts in a repeat loop (it's the loop that
creates the lag).
Creating an animation like this has some more disadvantages:
|
by: billrdio |
last post by:
I am trying to make a JavaScript animation of real-time images - i.e.
images that will periodically change on the server. The problem I am
having is that the JavaScript animation I have created is always using
the images from the cache, even though I have set the HTTP response
header on the server (via .htaccess) so that the browser should
validate the image in the cache against the image on the server for
freshness. I have tested the...
|
by: wmschneider |
last post by:
I am trying to make a progress animation so that the user knows that
there files are correctly being checked in. Trying to animate papers
moving from the computer to the server pics. I'm brand new at this
language, however, I've been programming in C++ for awhile. This is my
code for that part of it. And I call the startAnimation() function
when the button finish is clicked on. Represented like: <INPUT
TYPE="SUBMIT" NAME="SUBMIT"...
|
by: Burns |
last post by:
Hi,
I'm writing some code that talks to a POP3 server with a TcpClient. I can send and receive using a NetworkStream, but when I send my message, then try to recieve, no response has returned. I'm assuming that this is because the server hasn't had the chance to respond before the recieve buffer is read. If this is the case, then how do I tell my code to wait around before checking the stream?
If I just have a do{}until loop constantly...
|
by: NL |
last post by:
Hi,
Does anybody know how to turn off the animation Windows does with a window
as it's minimized/maximized to the taskbar?
I have an app which, when minimized, syncs to any other open instances of
the app and tells them to minimize. If I have more than a couple instances
open, the user ends up waiting quite a while for all of windows to minimize,
since each minimizing animation is done consecutively and not in parallel.
| |
by: Kiran B. |
last post by:
hi, i have a search.aspx page and from there it displays and go to
searchresualt.aspx...
Is there a way I can display an animation ..or something else while it's
searching...coz; my search takes a long time about 55 sec or so because of
the data....
Thanks
|
by: petermichaux |
last post by:
Hi,
Is there any way to make DOM scripted animation smoother? Flash is far
superior in this area. Any one here know what makes Flash so smooth by
comparison?
I don't like the fact that the standards based world is so far behind
the Flash based stuff in some areas (animation and server push in
particular)
|
by: Jono |
last post by:
Hi Everyone,
As it says in the title, I'm looking for a way to display a page while
long running operations are performed on the server. Ideally, I'd like
some way to push the current request onto some stack, where it would
continue to be processed asynchronously (most importantly preserving
things like view state, form post data, etc). In the interim, while the
main request is processed, a friendly page will be displayed to the
user....
|
by: avicalc |
last post by:
I need help with the structure of a JavaScript program. My process is
as follows:
1) Get JSON data via XMLHttpRequest.
2) When done with the above, process the JSON data which may take up
to 3 seconds.
3) Because of the possibility of a time consuming operation, display a
simple animation ("Loading...", etc) while the user is waiting.
What I need help with is how to control the animation. I know that I
|
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...
|
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,...
| |
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |