473,748 Members | 6,037 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Status bar shows anchor href, not text I set in onmouseover

I have a menu tree made up of anchors inside list items in a
multi-level list that includes HTML like:

<ul id='xx'>
<li><a href='conf.cgi' class='menu' target='main'
title='Configur e stuff' onclick='rememb er("conf.cgi") '
onmouseover='ha ndleOver("Confi gure stuff")'>Settin gs</a></li>
</ul>

with the javascript:

function remember(cgi) {
var exp = new Date();
exp.setTime(exp .getTime() + 30 * 24 * 60 * 60 * 1000);
setCookie('last Page',cgi,exp);
}
function handleOver(text ) {
window.status=t ext;
}

but when I mouse over this, the status bar shows the full path to the
cgi:

http://hostname/cgi-bin/conf.cgi

I've put an alert() into handleOver() so I know it's getting invoked
and my JavaScript console is clean. What am I doing wrong?

While I want a general solution, I'm doing my development and initial
testing on Mozilla 1.7.3.

Any pointers appreciated. Thanks.

Chris

Oct 28 '05
17 4369
VK
> Status bar shows anchor href, not text I set in onmouseover

OK - maybe making it as a puzzle will finally attract you to *read* the
suggested FAQ

Read it *through* again and try to find the condition missing in your
script. Theanswer is given below the FAQ's link (ROT 13 encoded).

FAQ 4.35
<http://www.jibbering.c om/faq/#FAQ4_35>

<ANSWER: ROT 13>
lbh fubhyq erghea gehr sebz gur rirag
</ANSWER: ROT 13>

Oct 28 '05 #11
VK wrote:
Status bar shows anchor href, not text I set in onmouseover


OK - maybe making it as a puzzle will finally attract you to *read* the
suggested FAQ

Read it *through* again and try to find the condition missing in your
script. Theanswer is given below the FAQ's link (ROT 13 encoded).

FAQ 4.35
<http://www.jibbering.c om/faq/#FAQ4_35>

<ANSWER: ROT 13>
lbh fubhyq erghea gehr sebz gur rirag
</ANSWER: ROT 13>


Yes, that's one of the changes I made. Having reviewed the FAQ, I

1) used setTimeout to delay setting the status, and

2) returned true from the event handler.

My code now looks like:

function setStatus(text) {
var a ='window.status =\''+text+'\'';
setTimeout(a,15 );
return true;
}
function clearStatus() {
window.status=' '
return true;
}

and the HTML looks like:

<li><a href='sysconf.c gi' class='menu' target='main'
title='Configur e stuff'
onmouseout='cle arStatus()'
onmouseover='se tStatus("Config ure stuff")'>Settin gs</a></li>

This seems to be fine in IE and Opera but now with Firefox or Mozilla
(where the href shows up, not the desired text).

Oct 28 '05 #12
Christopher Nelson wrote:

I don't know that I'll do better than what I have. I'd really like to
fix the status bar in Mozilla and Firefox if I could but I don't know
what the problem is.


The default settings in Firefox prevent you from changing the status bar
text. Go to Preferences -> Web Features -> Enable Javascript ->
Advanced... and make sure "Change status bar text" is checked.
Oct 28 '05 #13
dx27s wrote:
Christopher Nelson wrote:

I don't know that I'll do better than what I have. I'd really like to
fix the status bar in Mozilla and Firefox if I could but I don't know
what the problem is.


The default settings in Firefox prevent you from changing the status bar
text. Go to Preferences -> Web Features -> Enable Javascript ->
Advanced... and make sure "Change status bar text" is checked.


Thanks but even with that enabled, the status bar still shows the href,
not my text. I'm using Firefox v1.0.1, if that matters. <shrug>

Oct 28 '05 #14
Lee
Christopher Nelson said:

dx27s wrote:
Christopher Nelson wrote:
>
> I don't know that I'll do better than what I have. I'd really like to
> fix the status bar in Mozilla and Firefox if I could but I don't know
> what the problem is.


The default settings in Firefox prevent you from changing the status bar
text. Go to Preferences -> Web Features -> Enable Javascript ->
Advanced... and make sure "Change status bar text" is checked.


Thanks but even with that enabled, the status bar still shows the href,
not my text. I'm using Firefox v1.0.1, if that matters. <shrug>


With changing the status bar enabled, the following works for
me in Firefox 1.0.7:

<html>
<body>
<script type="text/javascript">
function handleOver(text ) {
window.status=t ext;
}
</script>
<a href="#" onmouseover="ha ndleOver('my message');retur n true">Demo</a>
</body>
</html>

Oct 28 '05 #15
Christopher Nelson wrote:
My code now looks like:

function setStatus(text) {
var a ='window.status =\''+text+'\'';
setTimeout(a,15 );
Timeouts/intervalls less than 25 *milli*seconds are seldom reliable, and

setTimeout("win dow.status = '" + text + "';", 25);

will suffice.
[...]
and the HTML looks like:

<li><a href='sysconf.c gi' class='menu' target='main'
Think about if the `target' attribute is really necessary. If it is for
frames, think about replacing frames by block elements positioned with CSS.
title='Configur e stuff'
onmouseout='cle arStatus()'
onmouseover='se tStatus("Config ure stuff")'>Settin gs</a></li>

This seems to be fine in IE and Opera but now with Firefox or Mozilla
(where the href shows up, not the desired text).


You have probably set the preference that disallows scripts to manipulate
the content of the status bar (in Firefox: Edit/Tools, Preferences, Web
Features, Enable JavaScript, Advanced, [_] Change status bar text). That
said, you should almost never mess with the status bar, definitely not
here.
PointedEars
Oct 28 '05 #16
Christopher Nelson wrote:
dx27s wrote:
Christopher Nelson wrote:
> I don't know that I'll do better than what I have. I'd really like to
> fix the status bar in Mozilla and Firefox if I could but I don't know
> what the problem is.
The default settings in Firefox prevent you from changing the status bar
text. Go to Preferences -> Web Features -> Enable Javascript ->
Advanced... and make sure "Change status bar text" is checked.


Thanks but even with that enabled, the status bar still shows the href,
not my text. I'm using Firefox v1.0.1, if that matters. <shrug>


The following works for me in

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922
Firefox/1.0.7 (Debian package 1.0.7-1) Mnenhy/0.7.2.0

(and other UAs) if the above pref is enabled:

function setStatus(o, bHideURI)
{
var s = o.title;

if (!bHideURI && typeof o.href != "undefined" )
{
s += " (" + o.href + ")";
}

window.status = s;
return true;
}

function resetStatus()
{
window.status = window.defaultS tatus;

return true;
}

HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- missing system identifier triggers Quirks Mode -->
[...]
<a href="main.en.p hp" title="Display& nbsp;Language: English"
onmouseover="re turn setStatus(this) " onmouseout="res etStatus()"English</a>

HTH

PointedEars
Oct 28 '05 #17
Thomas 'PointedEars' Lahn wrote:
...
The following works for me in

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922
Firefox/1.0.7 (Debian package 1.0.7-1) Mnenhy/0.7.2.0

(and other UAs) if the above pref is enabled:

function setStatus(o, bHideURI)
{
var s = o.title;

if (!bHideURI && typeof o.href != "undefined" )
{
s += " (" + o.href + ")";
}

window.status = s;
return true;
}

...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- missing system identifier triggers Quirks Mode -->
[...]
<a href="main.en.p hp" title="Display& nbsp;Language: English"
onmouseover="re turn setStatus(this) " onmouseout="res etStatus()"
>English</a>


Cool. I like using o.title for the status bar. Thanks.

Oct 31 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3136
by: Ian Shere | last post by:
I have a disclaimer page prior to a visitor going to my FAQ page. I want to hide the link which normally appears in the status bar from visitors seeing it. I am using the following code which works fine except that the "I Agree" link still shows the link path. What's wrong - driving me nuts!!?? <script language="JavaScript"> <!-- Hide the script from old browsers --
2
3268
by: Bob P. | last post by:
Hi, basically what I'd like to do is suppress the action that causes the URL to show up in the browser status bar when I roll over a hyperlink. I know I could use the onmouseover event in each anchor tag, but I'd rather be able to do it globally thru my stylesheet, rather than having to futz with each link. Does anyone know a solution for this? It seems like you could maybe add quick window.status='blah' javascript or something to the...
10
2436
by: Frances Del Rio | last post by:
on pop-up, which I have scripted to not show status bar, status bar still shows up in Firefox. Any way to get Firefox to open pop-ups w/o status bar at the bottom? thank you.. Frances
1
3300
by: CES | last post by:
All, Could someone please look at this and tell me what's wrong... the function works properly in FireFox but in IE onmouseover it replaces the innerHTML. So the original html: at info@test.com Thank you for your consideration. becomes at mailto:info@test.com:?SUBJECT=Request for additional information - Package id : /*JS var*/ Thank you for your consideration.
2
1628
by: Xerxes | last post by:
Hi, I am trying to hide/change the window.status text when the mouse is over the hyperlink text but it does not seem to work on Mozilla (Firefox). Am I doing something wrong: <a href="somefile.php" onMouseOver="window.status=''">text</a> <a href="somefile.php" onMouseOver="window.status='sample text'">text</a> Thanks.
4
5354
by: somaskarthic | last post by:
Hi In a php script , i'm passing some values as parameter in anchor tag attribute. e.g <a href = "test.php?id=110&name=xyz&sno=oo8s7"... On mouse over this link , these values are displayed in the status bar. To avoid this , i add a small javascript which makes the statusbar message null. It is working on mouseover event . But on mousedown event , it fails and displays the url with parameter in status bar. I added the same script...
4
10322
by: Jon | last post by:
Hi, I am calling the function showpopupWindow(item) to open and write a popup window. When testing in IE6 locally the popup window displays my text in both the title and status bars but when viewed online from my website the titlebar text is preceded by the full URL and a - ( eg http://www.........co.uk - text I want to display) and the status bar appears to only display Downloading picture...
3
4221
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change? ----------------------------------------------------------------------- When changing the status in an event (e.g. onmouseover) you should return true from the event. Also a number of browsers require a short delay before setting the status to overcome their default behaviour with the...
2
1650
by: NielsM | last post by:
Hello All, Found a bit of Javascript on this forum that shows the title-text of a link in the statusbar, so you don't have to type onmouseover="window.status='bla di bla'" in every link. http://groups.google.nl/group/comp.lang.javascript/browse_thread/thread/16906e69836826c3/4922a5c1a40fd2a1 But it does not show the title when the link (<a href=""..>text</a>) is in a DIV tag.
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9544
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.