473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

body.style.cursor='wait' problem

Hi,
I would like to ask for your help (I am using only IE5.5).

I have a very big table that I would like to sort.
During the sort I would like the cursor changed to 'wait' state and
back to default state when the sort is over.

The first row of table displays the columns titles when each cell (TD)
contain link to a sort function (sortTable).
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 name="meridCfgTable"
WIDTH=100% id=meridCfgTable >
<TR align="center">
<TD class=MERIDCFGTITLE>
<A CLASS=MERIDCFGTITLE HREF="javascript:sortTable(0,
meridCfgTable);">ID</A></TD>
…
function sortTable(col, tableToSort,stt)
{
document.body.style.cursor = 'wait';
window.setTimeout(function(){sortTableAfterWait(co l,
tableToSort);}, 1000);
}

function sortTableAfterWait(col, tableToSort)
{

// The table sorting process
document.body.style.cursor = 'default';
}
The problems are:

1. Sometimes the cursor is not being changed during the sort (even if
I enlarge the delay to 5000 ms).

2. Sometimes the cursor is changed but does not return to the
'default' state unless I move the mouse after the sort is finished.
I.e. the user can't tell when the sort is over without moving the
cursor.

Any solutions?

Thanks,

Yaron

Jul 20 '05 #1
1 21678
Ivo
"Yaron Cohen" <ya****@lyciumnetworks.com> wrote
I have a very big table that I would like to sort.
During the sort I would like the cursor changed to 'wait' state and
back to default state when the sort is over.

The problems are:

1. Sometimes the cursor is not being changed during the sort (even if
I enlarge the delay to 5000 ms).

2. Sometimes the cursor is changed but does not return to the
'default' state unless I move the mouse after the sort is finished.
I.e. the user can't tell when the sort is over without moving the
cursor.
<TABLE name="meridCfgTable" WIDTH=100% id=meridCfgTable >
" Quotes " are required around the 100% and recommended around the id value.
<TR align="center">
<TD class=MERIDCFGTITLE>
<A CLASS=MERIDCFGTITLE HREF="javascript:sortTable(0,
meridCfgTable);">ID</A></TD>
Don't use href="javascript:..." but onclick="..."
<A CLASS=MERIDCFGTITLE HREF="#" onclick="sortTable(0,meridCfgTable);">
function sortTable(col, tableToSort,stt)
{
document.body.style.cursor = 'wait';
window.setTimeout(function(){sortTableAfterWait(co l,
tableToSort);}, 1000);
No need to declare a new function: setTimeout expects a sting iirc:
window.setTimeout("sortTableAfterWait("+col+","+ta bleToSort+");", 1);
}

function sortTableAfterWait(col, tableToSort)
{

// The table sorting process
document.body.style.cursor = 'default';
}

Thanks,

Yaron


Jul 20 '05 #2

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

Similar topics

5
by: joy | last post by:
I have tables: books(book_id, title, publisher_name), branches(branch_id, branch_name, address), book_copies(book_id, branch_id, no_of_copies). I want to print out branch information, so I did: ...
1
by: GAS | last post by:
I have tried to figure this out for a couple of days now and I'm not making much headway. I have a cursor that I can't get to work properly. There are two cursors in the stored procedure. The...
18
by: Randall Sell | last post by:
http://www.bytewise.com.au/test/iebug.html I can not see why this doesn't work under IE6. Perhaps someone can shed some light on this, and a possible hack to get it to work. My ultimate goal is...
3
by: DarthMacgyver | last post by:
Hello, I recently wrote a survey application. Each question is very similar. The first questions gives me a problem when there are multiple people taking the survey (The Database connection...
0
by: Dominic Paquette | last post by:
Hi, I encountered a problem and I don't know if it's a bug or if I'm doing something wrong. I wrote a UserControl in which I wireup 2 event handlers MouseDown and MouseUp. MouseDown changes the...
1
by: mikee | last post by:
I am developing a program using VB.net. It's a web based program that use web controls. When the system display a checkboxlist, I immedately try to put up a popup screen. The problem is before the...
3
by: cnplnsk | last post by:
I have mysql server version: 5.0.15 I am facing this problem last a week about cursor. well ! i have created cursor program as follows... I written this program as external file, named as...
2
by: BilalGhazi | last post by:
Hi All, I have this strange problem. I am user of two different database (both are same version 9i). I created a procedure and within this procedure i used a cursor to select the values, this is...
12
radcaesar
by: radcaesar | last post by:
Hi, I am reading a xml file using T-SQL. I want the xml data to use in openxml. So i was using cursor here. Here i am concatenating the xml data into a variable called @FileContents. When i print...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...

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.