Personal computing discussed

Moderators: renee, SecretSquirrel, just brew it!

 
fc34
Minister of Gerbil Affairs
Topic Author
Posts: 2816
Joined: Wed May 08, 2002 8:39 am
Location: Somewhere

Javascript onMouseOver and onMouseOut

Mon Jul 28, 2003 3:37 am

Just wondering, these two commands dont seem to work anymore for me when using <a href></a>

For an example

<a href="http://www.website.com" onMouseOver="window.status='Click to see this site!'" onMouseOut="window.status=''">

It used to work for me but it dosent work now. Since I am a little out of date with HTML, is this feature disabled in the latest version of HTML?
Windows XP - The 64-bit wannabe with a 32-bit graphics interface for 16-bit extensions to a 8-bit patch on a 4-bit operating system designed to run on a 2-bit processor by a company that can't stand 1-bit of competition
 
thegleek
Darth Gerbil
Posts: 7460
Joined: Tue Jun 10, 2003 11:06 am
Location: Detroit, MI
Contact:

Mon Jul 28, 2003 10:14 am

try this:

<html.... blah blah blah...>

<head>
<STYLE type="text/css">
        .linkz {  text-decoration: none;
                 background-color: #FFFFFF;
                      font-family: Verdana, Arial, Helvetica, sans-serif;
                        font-size: 16pt;
                     font-weight : bold;
                            color: #000000 }
        SPAN   {           cursor: hand;   }
        .onme  {            color: red;    }
        .offme {            color: black;  }
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
        function getonme() {
          el=event.srcElement; if (el.getAttribute("litUp1") != null) { el.className="onme"; }
        }
        function getoffme() {
          el=event.srcElement; if (el.getAttribute("litUp1") != null) { el.className="offme"; }
        }
        document.onmouseover=getonme; document.onmouseout=getoffme;
</SCRIPT>
</head>

<body blah blah blah....>

<a href="http://www.website.com" class="linkz">
<SPAN TITLE="click to see this site!" litUp1>website.com</SPAN></a>

</body></html>


w00t
––•–√\/––√\/––•–– nostalgia is an emotion for people with no future ––•–√\/––√\/––•–-
 
fc34
Minister of Gerbil Affairs
Topic Author
Posts: 2816
Joined: Wed May 08, 2002 8:39 am
Location: Somewhere

Tue Jul 29, 2003 5:07 am

why all that code?

I realized that all i forgot to do was to add a ';return true' at the end of both lines. :oops:

Besides, i dont understand all the code that you just added.
Windows XP - The 64-bit wannabe with a 32-bit graphics interface for 16-bit extensions to a 8-bit patch on a 4-bit operating system designed to run on a 2-bit processor by a company that can't stand 1-bit of competition
 
FubbHead
Grand Gerbil Poohbah
Posts: 3482
Joined: Mon Apr 08, 2002 9:04 pm
Location: Borås, Sweden

Tue Jul 29, 2003 7:46 am

You can add a lot of more effects when using stylesheets, I guess.

:)
Amiga 1200, 68020@28MHz, 4MB+2MB RAM, Conner 80MB harddrive
 
fc34
Minister of Gerbil Affairs
Topic Author
Posts: 2816
Joined: Wed May 08, 2002 8:39 am
Location: Somewhere

Tue Jul 29, 2003 8:12 pm

LOL thanx anyways.
Windows XP - The 64-bit wannabe with a 32-bit graphics interface for 16-bit extensions to a 8-bit patch on a 4-bit operating system designed to run on a 2-bit processor by a company that can't stand 1-bit of competition

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On