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!

OnMouseDown in IE6

Status
Not open for further replies.

ggriffit

Programmer
Oct 25, 2002
1,578
GB
Dear All,
am trying to override the status bar message shown for a link as my client wants a custom message ALL the time, the following code seems to work for all events except OnMouseDown, any ideas ? needs to work with IE6 only :

Code:
<html>
	<head>
		<script>	
			function clearStatus()
			{
				window.status="GREG";
			}
			function clearStatus2()
			{
				window.status="GRIFFITHS";
			}	
		</script>
	</head>
	<body>
		<a href="[URL unfurl="true"]http://www.greggriffiths.org"[/URL] 
		onmousedown="clearStatus()"
		onmouseup="clearStatus()" 
		onmouseover="clearStatus()" 
		onmouseout="clearStatus()" 
		onclick="clearStatus()" 
		onmouseclick="clearStatus()" 
		onmousedblclick="clearStatus()" 
		onmousemove="clearStatus()" 
		onmouseenter="clearStatus()" 
		onmouseleave="clearStatus()" 
		>TEST</a>
		<p>
		<a href="[URL unfurl="true"]http://www.greggriffiths.org/livelink/"[/URL] 
		onmousedown="clearStatus2()" 
		onmouseup="clearStatus2()" 
		onmouseover="clearStatus2()" 
		onmouseout="clearStatus2()" 
		onclick="clearStatus2()" 
		onmousedblclick="clearStatus2()" 
		onmousemove="clearStatus2()" 
		onmouseenter="clearStatus2()" 
		onmouseleave="clearStatus2()" 
		>TEST2</a>
		<p>
	</body>
</html>

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
The only way I can suggest is to use a timer to override the status message after IE has written out its default string:

Code:
<html>
<head>
	<script type="text/javascript">
		function clearStatus() {
			window.status = 'GREG';
		}

		function clearStatus2() {
			window.status = 'GRIFFITHS';
		}

		function clearStatusDelay() {
			window.setTimeout(clearStatus, 50);
		}

		function clearStatusDelay2() {
			window.setTimeout(clearStatus2, 50);
		}
	</script>
</head>

<body>
	<p>
		<a href="[URL unfurl="true"]http://www.greggriffiths.org"[/URL]
			onmousedown="clearStatusDelay()"
			onmouseup="clearStatus()"
			onmouseover="clearStatus()"
			onmouseout="clearStatus()"
			onclick="clearStatus()"
			onmouseclick="clearStatus()"
			onmousedblclick="clearStatus()"
			onmousemove="clearStatus()"
			onmouseenter="clearStatus()"
			onmouseleave="clearStatus()"
		>TEST</a>
	</p>

	<p>
		<a href="[URL unfurl="true"]http://www.greggriffiths.org/livelink/"[/URL]
			onmousedown="clearStatusDelay2()"
			onmouseup="clearStatus2()"
			onmouseover="clearStatus2()"
			onmouseout="clearStatus2()"
			onclick="clearStatus2()"
			onmousedblclick="clearStatus2()"
			onmousemove="clearStatus2()"
			onmouseenter="clearStatus2()"
			onmouseleave="clearStatus2()"
		>TEST2</a>
	</p>
</body>
</html>

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Snippets & Info:
The Out Atheism Campaign
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top