473,770 Members | 2,144 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display problem

Hi,

I've written a function in javascript to obtain content using AJAX.
While AJAX is loading, I want to show a div which says "please wait
while loading. This is a part of the function:

z.style.display = "none";
y.style.display = "block";

ajax = new AjaxHandler;
nt = ajax.send("ztbl _prestationlist .asp","");

y.style.display = "none";
z.style.display = "block";

z is the container div for the ajax content, and y is a "please wait
while loading"-div.

The function is triggered with <body onload=""but also in the page
later on... When I open the page, it works perfectly, but when I
trigger the function to load other content, the div "y" does not
show...

What am I doing wrong ?
kind regards,
Mathew

Apr 4 '07 #1
2 1714
"Lupus" <ma**********@g mail.comwrote in message
news:11******** **************@ y66g2000hsf.goo glegroups.com.. .
Hi,

I've written a function in javascript to obtain content using AJAX.
While AJAX is loading, I want to show a div which says "please wait
while loading. This is a part of the function:

z.style.display = "none";
y.style.display = "block";

ajax = new AjaxHandler;
nt = ajax.send("ztbl _prestationlist .asp","");

y.style.display = "none";
z.style.display = "block";

z is the container div for the ajax content, and y is a "please wait
while loading"-div.

The function is triggered with <body onload=""but also in the page
later on... When I open the page, it works perfectly, but when I
trigger the function to load other content, the div "y" does not
show...

What am I doing wrong ?
Break it down to its smallest component.

During the onprogress event of your XMLHttpRequest object display the element via:

validElementRef erence.style.di splay = 'block';

When the onload event of your XMLHttpRequest objects fires, hide the element via:

validElementRef erence.style.di splay = 'none';

validElementRef erence either being a single element of an object collection or an object
as found by getElementById.

-Lost
Apr 4 '07 #2

Lupus wrote:
ajax = new AjaxHandler;
nt = ajax.send("ztbl _prestationlist .asp","");

y.style.display = "none";
z.style.display = "block";

z is the container div for the ajax content, and y is a "please wait
while loading"-div.
Hi,
Put the script that hides "please wait while loading"-div in the
function that process the result of XmlHttpRequest. If it is placed
right after ajax.send("ztbl _prestationlist .asp",""); then the div
hides as soon as request will be sent.

Apr 5 '07 #3

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

Similar topics

1
3597
by: Agency | last post by:
I'm still working on the bpm counter. I need to have at least 2 displays that are not static. One would be a clock/running time and the other would should the current beat count. How would I do this in Tkinter? I was thinkning of canvas-text, but there must be a widget for doing this kind of display. I'm a bit lost and would appreciate some help.
5
1915
by: David Greenwood | last post by:
I posted this under 'microsoft.public.sqlserver.client' but got no reply. Any help with this problem would be greatly appreciated --------------------- I developed a database under SQL Server 2000, with Access 2000 on Windows 2000 as client. This had been running fine for several years. The client is now upgrading to Windows XP, and has come across a display problem on the reports. The figures are correct but are now displayed with lots of...
13
40764
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
19
6932
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the JavaScript in this code from a couple different sites but I'm not 100% sure what each line is doing...This is the ASP code that I'm using for the page....Take a look at the JavaScript code and please let me know what each line is doing....I have been...
3
10254
by: shreddie | last post by:
Could anyone assist with the following problem? I'm using JavaScript to hide/show table rows depending on the option selected in radio buttons. The script works fine in IE but in Firefox the hidden rows take up page space even though their content is not visible. I have extracted the necessary code as shown below: ************************************************************************
2
1989
by: s.chelliah | last post by:
We have an input field which allows the user to enter a string of (up to 62) ASCII printable characters. We have a need to allow the user to be able to specify any sequence of characters he/she desires. However, we have a problem when we attempt to display this same string of characters. If the input sequence of characters contains HTML interpretable strings of characters, the user's sequence of characters is not properly displayed. (We...
2
3363
by: ruby_bestcoder | last post by:
Hi Im having problem in firefox with display:none/block. I have essentially 3 li elements. In each element there are a few nested div:s. Clicking on one of the divs, makes another div to display: block or none. Again this works in IE. In ff it has a bug. When the display is none for a div in the first li, then the next li (the one underneath) moves up to the right, looking very ugly. Is there someone who has had the
7
3077
by: Janis | last post by:
I try to understand what could be the source of a problem with displaying and hiding rows of tables using display:block/none. I've read selfhtml but could not find any hint about that. Any pointers why that can happen, or how I should take care of that type of problem/effect are highly appreciated. The problem... A couple times the hiding/displaying works, but _occasionally_ the entries are hidden but _blank lines appear_, instead.
15
3166
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out, of course). <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="en-us" />
10
7421
by: dkyadav80 | last post by:
<html> /// here what shoud be java script for: ->when script run then not display all input text field only display selection field. ->when user select other value for institute only this field display not display degree text field ->when user select other value in the selection field for degree then text field display and wise versa //// <bodly> <table>
0
9618
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...
1
10038
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
9906
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
8933
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...
1
7456
isladogs
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...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4007
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
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
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.