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!

Changing cursor to hour glass

Status
Not open for further replies.

AndyApp

Programmer
Dec 20, 2001
259
GB
Hi,

Is there a way to change a users cursor to the hour glass everytime my page starts to load? All users will only be using IE6 and the page calls numerous functions that cause the page to refresh or reload.

If they interrupt the process by selecting a different drop down before the page has reloaded it can cause all sorts of problems.

The solution in vbscript would be ideal.

Thanks. "Life is like a Ferrari, it goes to fast.
But that's ok, because you can't afford it anyway" - Jim Davis (Garfield)
 
<HTML>
<HEAD>
<TITLE>Active Web Page</TITLE>

<SCRIPT language=&quot;JavaScript&quot;>

var MouseOverCol = &quot;#ff0000&quot;;
var MouseNotOverCol = &quot;#0000ff&quot;;

function ToColorJS(NewColor)
{
window.event.srcElement.style.color = NewColor;
}
</SCRIPT>

<SCRIPT language=&quot;vbScript&quot;>

Const MouseOverColor = &quot;#ff0000&quot;
Const MouseNotOverColor = &quot;#0000ff&quot;

function ToColor(NewColor)
window.event.srcElement.style.color = NewColor
window.event.srcElement.style.cursor = &quot;wait&quot;
end function
</script>
</HEAD>

<Body bgcolor=&quot;#00ffff&quot;>
<a href=&quot; onmouseover=&quot;ToColor(MouseOverColor)&quot;
onmouseout=&quot;ToColor(MouseNotOverColor)&quot; id=&quot;TheLinkVBS&quot;
language=&quot;vbScript&quot;>Developer's Exchange (VBScript)</a>
<p>
<a href=&quot; onmouseover=&quot;ToColorJS(MouseOverCol)&quot;
onmouseout=&quot;ToColorJS(MouseNotOverCol)&quot; id=&quot;TheLinkJS&quot;
language=&quot;JavaScript&quot;>Developer's Exchange (JavaScript)</a>

</BODY>
</HTML>


this is the important line window.event.srcElement.style.cursor = &quot;wait&quot;


Regards
Steve Friday
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top