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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hourglass 1

Status
Not open for further replies.

forrozeiro

Programmer
Sep 1, 2001
38
0
0
BR
Hi,

Is that a way to force the hourglass to be shwon after clicking a link, or to disable that link after clicking it ??
The scenario is:

frame A:
[base target=frameB]
[a href=newlocation]mylink[/a]

When the users click on 'mylink', the hourglass doesn't appear, and some of them keep clicking because they think that nothing happened.
OK, I could create a variable 'clicked' and make 'mylink' call a javascript method, such as:
function myfunction( newlocation ){
if( clicked ) return;
frameB.location.href=newlocation;
clicked=true;}
But I would like to know about other approachs.

Thank you in advance!
 
this would work for IE at least and should display an hourglass in Netscape6 if the mouse is over a link i think.
Code:
<style>
	.showGlass{cursor:wait;}
</style>
<SCRIPT LANGUAGE=javascript>
<!--
	function showHourglass(strURL)
	{
		if (document.getElementById)
		{
			document.body.className = 'showGlass';
			for (var i=0;i<document.links.length;i++)
				document.links[i].className = 'showGlass';
		}
		document.location.href = strURL;
	} //showHourglass
//-->
</SCRIPT>
and the links would look like 
<a href=&quot;javascript:showHourglass('[URL unfurl="true"]http://www.destiny3d.com');&quot;>hi[/URL] there</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top