Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 26th, 2003, 09:41 AM
Authorized User
 
Join Date: Jun 2003
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well ok. your help so far is greatly appreciated. I now have a working onmouseover- and onmouseoutevent for each link on a page. But the part i don't get is why the "self.status=''"-command doesn't work anymore. I guess this comes due that "self" doesn't point to the the current window anymore. How do i reach the "status"-attribute from the current window so i can hide the link from the statusbar?

function OnMouseOver(tagname)
    {
        self.status = '';
        tagname.style.color='red';
        return true;
    }

    function OnMouseOut(tagname)
    {
        tagname.style.color='black';
        return true;
    }


this will be my last question
 
Old November 26th, 2003, 12:00 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I don't know, no code I've seen ever hides the link on my browser anyway. If you don't want the link to show a diffrent way would be to create your own link using a span tag:
Code:
<span class="link" onclick="window.location ='/'">Home</span>
Then assign the style in a style block:
Code:
span.link
{
  text-decoration: underline;
  cursor:hand;
}
Then use your loop code to assign onmouseovers etc.:
Code:
var colSpans = document.getElementsByTagName("span");
for (var i = 0; i < colSpans.length; i++)
{
  if (colSpans[i].className == "link")
  {
    //colSpans[i].onmouseover = etc.  
  }
}
Harking back, the ALINK attribute goes into the body tag, not the onmouseover code. See the link I posted.

<quote>
this will be my last question
</quote>

Can I bet on that :)

--

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
Challenge : hiding getURL link chayanvinayak Flash (all versions) 1 January 5th, 2007 01:17 AM
LinkButton should not show javascript in Statusbar savan_thakkar ASP.NET 1.0 and 1.1 Professional 2 August 27th, 2006 06:25 AM
how to make a WinApp stay in statusbar? csc820203 C# 1 June 22nd, 2004 10:21 AM
Changing the font size in a statusbar xgbnow C++ Programming 0 February 3rd, 2004 04:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.