Hide status bar on IE7

Hi, i have a page that display photos.
Each of photo will link to another page. I want to hide the link that appears at status bar.
I'm using this code :
//Hide status bar msg II script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
      
function hidestatus(){
      window.status=""
      return true
}
      
if (document.layers)
      document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
      
document.onmouseover=hidestatus;
document.onmouseout=hidestatus;

The code can work on Firefox, but it doesn't work on IE 7.
I read an article that mentions IE 7 already took out javascript window.status changes in order to prevent phishing/address spoofing. Is there any way to make the cod work on IE 7?
Can someone help me, pls? Thanks in advance.
cemplukcute2003Asked:
Who is Participating?
 
TNameConnect With a Mentor Commented:
AFAIK, IE7 doesn't allow setting the status bar text via window.status for Internet and Restricted Zones
unless the option
"Allow status bar updates via script" in the internet Options > Security is enabled:
http://www.sandhills.edu/blackboard/statusbarscript.htm
http://www.csupomona.edu/~ehelp/blackboard/student/step/allow_status_bar.html

See "Status Bar Scripting" (towards the bottom of the page) here:
http://msdn2.microsoft.com/en-us/ie/aa740486.aspx


But a simple workaround like this seems to still work:
<a href="http://www.google.com"  onClick="window.location='http://www.experts-exchange.com'; return false;">A link</a>
0
 
gops1Commented:
Here is it:

if (document.addEventListener){ //for Mozilla/netscape
      document.addEventListener("mousedown", hidestatus, true);
}else if(document.attachEvent){///for IE
      document.attachEvent("onmousedown", hidestatus);
}else{ //Netscape 4.x versions
      window.captureEvents(Event.CLICK | Event.MOUSEDOWN | Event.MOUSEUP | Event.KEYDOWN);
      window.onclick=hidestatus;
      window.onkeydown=hidestatus;
}
0
 
cemplukcute2003Author Commented:
Hmm, it still can't work for IE7.
I still can see the link at the status bar.
Why ah?
0
 
TNameCommented:
>But a simple workaround like this seems to still work:
Well, this of course is no workaround for simply hiding the status bar text.
It's a no-nice way of lying.
0
 
cemplukcute2003Author Commented:
Yes, I'm agree with you, TName. It's not a nice way to do something like that.
Thanks for the confirmation that you have given me :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.