Solved

Rollovers in NS

Posted on 2000-04-04
10
201 Views
Last Modified: 2010-04-09
Hi There,
Is there any way to do text based rollovers in NS?  I have the code below for IE but I am looking for a NS equivalent:

<a href="somefile.htm" class = "off" onMouseOver = "this.className ='on'"
 onMouseOut = "this.className = 'off'">Click here</a>

The only thing that I REALLY trying to get to happen is to have the text change state in some way.  The best solution would be to have the links underline onMouseOver and have no text-decoration when off.

davlun
0
Comment
Question by:davlun20080
10 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 2686563
Netscape sucks in the hover style...so you indeed should use onmouseover. But even then...you can't change the class-type in it. You should make a layer above it....

0
 
LVL 3

Author Comment

by:davlun20080
ID: 2686904
So in other words I would have to build a series of layers each with either the on or off state of a link, then onMouseOver to show/hide appropriate links?

davlun
0
 
LVL 3

Author Comment

by:davlun20080
ID: 2686905
Is there any way to do a src element type script to take care of the swapping automatically?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 8

Accepted Solution

by:
jbirk earned 100 total points
ID: 2687475
Check out this site:
http://webreference.com/js/column4/
It has a tutorial on doing text rollovers (a color change in this case) cross browser.  You could modify that to change whatever property you wanted though:)
-Josh
0
 
LVL 1

Expert Comment

by:hkmdj
ID: 2689275
I use something that I call the NetScape Dot.  I use the CSS (NOT IE) standard a:hover and I use a mouseover that changes a dot image next to the text.  Then netscape users see the activity.

Check it at http://davidj.org/

Menu bar on the left.

David Johnson
0
 
LVL 1

Expert Comment

by:bassque
ID: 2689719
here's the code
works ver well ;-)

in between the head tags us this
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>


IN BETWEEN THE BODY TAGS USE THIS

<body bgcolor="#FFFFFF" onLoad="MM_preloadImages('up.jpg')">
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','up.jpg',1)"><img name="Image1" border="0" src="down.jpg" width="100" height="50"></a>

you'll love it
enjoy
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2689752
bassque, davlun was asking for TEXT rollovers not image rollovers...

-Josh
0
 
LVL 3

Author Comment

by:davlun20080
ID: 2689928
bassque, jbirk is correct in that I am looking for text rollovers.  I am familiar with scripts for image swapping.  Am going to reject your answer because I want to avoid images, using text instead.  

0
 
LVL 3

Author Comment

by:davlun20080
ID: 2689935
hkmdj,
Thanks for the info, however the a:hover attribute you mention is only supported in IE at this time.  Each browser has their own implementation of the CSS standard but IE is much closer to the standard.

davlun
0
 
LVL 3

Author Comment

by:davlun20080
ID: 2689938
Not the perfect solution, but good.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question