Thread: Mouse over help
View Single Post
Old 2006-12-01, 02:16 PM   #5
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
This is a start. You can have the status print whatever you want, i.e. "Click to visit this site"
Code:
<script type="text/javascript">
function initialize(){
	var x = document.getElementsByTagName('a');
	for (var i=0; i< x.length; i++){
		x[i].onmouseover = function(){return ShowIt()}
		x[i].onfocus = function(){return ShowIt()}
		x[i].onmouseout = function(){return ClearIt()}
		x[i].target = "_blank";
	}
}
function ClearIt(){
  window.status = '';
  return true;
}
function ShowIt(){
  window.status = 'Click to visit this site';
  return true;
}
window.onload = initialize;
</script>

** NOTES:
This is the only way I've found to open a new window in XHTML complient pages

Using base target="_blank" in the head, apparently does not work with IE7.
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.

Last edited by oast; 2006-12-01 at 02:21 PM..
oast is offline   Reply With Quote