473,387 Members | 1,529 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Javascript - Need to hide Status bar message for links

76
Be it far beyond me as to why but I am merely a worker bee the customer has decided that he doesn't want the links URL to appear in the status bar but instead wants a message like "Click to open" to appear instead.

I've looked up a few different ways but the way I've seen doesn't actually work. I would like code that will work for all links that I can just shove into a global script instead of adding a function to each individual links.

This does NOT work
<script language="javascript">
function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>

If I use the hidestatus function in a link that calls it--it does work however is there a way to do this automatically so I don't have to go through five bazillion links?

What works:
<a href="test.aspx" onmouseover="return hidestatus()">Test Page</a>
Jul 11 '06 #1
7 15888
Arielle
76
I've decided to take a different approach. I now call a function from the onload attribute of the function that calls the following.

function hideStatusLinks()
{
var doc = document.body.getElementByTag("a");
for (var x=0;x<doc.length;x++)
{
doc[x].setAttribute("onmouseover",hideLink);
}
}

function hideLink()
{
window.status = "Frogs like teacups";
}


But it -still- doesn't work. If I change the window.status to alert("Frogs"); it works perfectly so I'm starting to wonder about the changing of the status. It's one of those problems that is kicking my butt but I bet tonight I'll suddenly get a eureka.
Jul 11 '06 #2
sashi
1,754 Expert 1GB
Hi there,

the simplest solution is..

example 1..
Expand|Select|Wrap|Line Numbers
  1. <a href="http://www.somewhere.com" onMouseOver="window.status='Some Message Text Here'; return true;">Link Name</a>
  2.  
example 2..
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript">
  2. function writetostatus(input){
  3.     window.status=input;
  4.     return true;
  5. }
  6. </script>
  7.  
usage..
Expand|Select|Wrap|Line Numbers
  1. <a href="http://www.somewhere.com" onMouseover="writetostatus('Some Message Text Here')"
  2. onMouseout="writetostatus('')">Link Name</a>
  3.  
i have been the second example on all my web projects and it works fine.. hope it works fine for you too.. good luck my fren.. :)
Jul 11 '06 #3
Banfa
9,065 Expert Mod 8TB
I think

doc[x].setAttribute("onmouseover",hideLink);

needs to be

doc[x].setAttribute("onmouseover","hideLink();");
Jul 12 '06 #4
Arielle
76
Thanks,

Yeah I knew about that one I was just trying to see if there was a way to dynamically generate it rather than go through all the links on the website. (It's a very large website... )

In the end I just ended up doing a very large search & replace...
Jul 12 '06 #5
iam_clint
1,208 Expert 1GB
<script>
function hidestatus(){
window.status='How ya doin there captain!'
return true
}

document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>
Jul 15 '06 #6
Hi there,

the simplest solution is..

example 1..
Expand|Select|Wrap|Line Numbers
  1. <a href="http://www.somewhere.com" onMouseOver="window.status='Some Message Text Here'; return true;">Link Name</a>
  2.  
example 2..
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript">
  2. function writetostatus(input){
  3.     window.status=input;
  4.     return true;
  5. }
  6. </script>
  7.  
usage..
Expand|Select|Wrap|Line Numbers
  1. <a href="http://www.somewhere.com" onMouseover="writetostatus('Some Message Text Here')"
  2. onMouseout="writetostatus('')">Link Name</a>
  3.  
i have been the second example on all my web projects and it works fine.. hope it works fine for you too.. good luck my fren.. :)

Hey I was wondering where exactly you should put the codes in at the html. Sorry I'm a newbie at html so was hoping you could help me. Do I put it between <head>? Any help would be appreciated.
Feb 19 '07 #7
acoder
16,027 Expert Mod 8TB
Hey I was wondering where exactly you should put the codes in at the html. Sorry I'm a newbie at html so was hoping you could help me. Do I put it between <head>? Any help would be appreciated.
Welcome to The Scripts.

You can put the javascript code in between the head tags. that should work fine. You can also put it in the body tags. See this page for more information.
Feb 19 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: mark4asp | last post by:
Why won't the window.status message change ? IE ver. 6.0.2800.1106 displays the tooltip OK. <td> <A HREF="editAuthor.asp?item=4" title="Edit author details"...
3
by: dan baker | last post by:
I have a couple page where even after they are done loading, the status message gets stuck with "Transferring data from <host>... Are there some typical syntax errors in either javascript of html...
9
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...
5
by: Boo | last post by:
I know it's possible to manipulate the status bar when a user scrolls over links, but is there a way to completely disable or hide it? I have a flash program that connects to a database every 5...
3
by: Srinu | last post by:
How do i hide status bar in firefox using java script only Plz help me iam new to this group.
5
by: widevision7 | last post by:
I have a web site that uses the following JavaScript to hide <div> sections: <script type="text/javascript"> function showMe (it, box) { var vis = (box.checked) ? "block" : "none";...
1
by: axelman | last post by:
Hi everybody, sorry if this seems stupid but I'm a newbie :-( to all of this. I'm trying to hide the full file path in IE7 and IE6 while a user clicks on alink on my page and downloads a file...
1
by: Roland | last post by:
Hello, I am writing modal dialog box to display progress of downloading file. I am starting download of a file in constructor of dialog using some asynchronous method call which returns me an...
1
by: KiSSFRo | last post by:
Hi all, I was wondering if someone could tell me which is the best command to use to run a unix command and to hide the error output from the shell. I'd also like to be able to tell if the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...

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.