admin 管理员组文章数量: 1086019
Currently I am using this:
OnMouseOver="window.status='';return true;"
for:
<asp:LinkButton ID="lnkCategory" runat="server" onMouseOver="window.status='' ; return true;" onMouseOut="window.status='';" oncontextmenu="window.status=''; return true;">
This works fine in IE but not in Firefox.
How can I be able to change this?
I want to disable the status bar messages for the linkbutton.
Currently I am using this:
OnMouseOver="window.status='';return true;"
for:
<asp:LinkButton ID="lnkCategory" runat="server" onMouseOver="window.status='' ; return true;" onMouseOut="window.status='';" oncontextmenu="window.status=''; return true;">
This works fine in IE but not in Firefox.
How can I be able to change this?
I want to disable the status bar messages for the linkbutton.
Share Improve this question edited May 4, 2022 at 22:24 Brian Tompsett - 汤莱恩 5,89372 gold badges61 silver badges133 bronze badges asked Jun 29, 2009 at 13:18 Babu KumarasamyBabu Kumarasamy 3292 gold badges6 silver badges15 bronze badges6 Answers
Reset to default 4Disabling the status bar message is evil. Don't do it.
By default, this is turned off in Firefox. You'd have to force your users to change a config setting to make this work.
One alternative you could try is swapping out the value href
with an empty string on hover, then navigating the user to the link's href on click. This is considered a bad thing to do though. It's not bulletproof. Users could still tab to the link or do other things that should trigger a link's default behavior.
As karim79 said though, don't do it.
Disabling an expected browser behaviour is usually a bad idea. consider if you really need to do this.
I would caution against this - as others have posted it's expected behaviour.
On a personal note I use the status bar message to check that the link is really going where the page claims. If I found this on a page I'd be highly suspicious of the motives behind the site.
In Firefox, the user can control what a script is allowed to do. And like it says this post, the option is turned off by default:
Firefox settings for javascript http://img44.imageshack.us/img44/6683/61224673.jpg
Edit: So, there's not much you can do there, as you won't be able to manipulate browser settings with JavaScript code.
Some folks like to see messages on their Status Bar. Some don't. Some programmers cover all the bases by including Tool Tips and Status Bar messages in their A tags. Some don't. Some abuse the daylights out of it (eg, scrolling blinkers) which is likely why FF resorted to putting it under User control; where it should be.
Ethical issues aside, don't worry about it. The link text should be clear enough; the additional text in the Tool Tips and Status Bar message should only expand upon that.
For example, if the link text reads 'Home' then the Tool Tip and Status Bar (as you like) should read something like 'Click here to return to Home page.'
The side benefit is that some 'screen readers' for the sight impaired are able to use the additional text in the A tag (although once again everyone seems to have gone their own way on this so, again, covering all the bases seems prudent).
本文标签:
版权声明:本文标题:javascript - Script to hide status bar messages in Firefox, IE, Opera, Safari? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1741745057a2312781.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论