Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display hourglass when page is loading 3

Status
Not open for further replies.

lsvprasad

Technical User
Oct 31, 2002
3
US
hi,

I want to display the hourglass cursor, when the page is submitted and change the cursor to normal arrow, when the page has loaded.

Can this be done using javascript.

cheers,
prasad.
 
Yes, but afaik it has to be done for all elements seperately. Try the following (for IE at least! [wink]):

for (var i=0; i<document.all.length; i++) {
document.all(i).style.cursor=&quot;wait&quot;;
}
Cheers,
Nico
 
I want to know if the same works in NetScape Prasad Lanka,
Analyst,
OrbiTech Solutions Ltd.,
Hyderabad,
AP, India
 
I used a technique that made sure it worked in NS6+ as well as IE5+.

Put a div in front of the whole page and have this div remains transparent. put style=&quot;cursor:wait;&quot; in it! :) Gary Haran
 
Where do I need to implement this function if I want to display the houglass as a cursor while the form is submitting, and then back to the arrow when the page is loaded?
 
Here's a model that works off of a button shouldn't
be much to include the features in your validation
routine. Let us know if this doesn't work just right.

Code:
<html><head>
<script language=&quot;javascript&quot;>
function stpact(){
document.getElementById('Sbtn').disabled = true;
document.getElementById('outer').style.cursor = 'wait';
}
</script></head><body>
<div id=&quot;outer&quot; style='background:#000099;' >
<p>test
<input type=&quot;button&quot; id=&quot;Sbtn&quot; onClick=&quot;stpact();&quot; value=&quot; Click &quot;>
<br>test</p></div></body></html>

2b||!2b
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top