Re: JAVASCRIPT conflict with anchor style

by "Rythmist" <Rythmist(at)gamewood.net>

 Date:  Mon, 18 Sep 2000 18:06:05 -0400
 To:  "Kathy Wargo" <kathywargo(at)hotmail.com>,
<hwg-languages(at)hwg.org>
 References:  hotmail
  todo: View Thread, Original
Hi,

The method I use is to set a style sheet to remove underlines from all
links, then the Links I want underlined, I just highlight and underline
them.

<html>
<head>
<title></title>
<style TYPE="text/css">
    A:link    {text-decoration: none}
    A:visited {text-decoration: none}
    A:active  {text-decoration: none}
</style>
</head>
<body>
    <p><a href="#">Link One</a></p>
    <p><a href="#"><u>Link Two</u></a></p>
</body>
</html>


Rythmist
----- Original Message -----
From: "Kathy Wargo" <kathywargo(at)hotmail.com>
To: <hwg-languages(at)hwg.org>
Sent: Monday, September 18, 2000 4:48 PM
Subject: JAVASCRIPT conflict with anchor style


> In Netscape
>
> I have a javascript which displays the last modified date for a document.
>
> If in my code I have an anchor  with the following style:
>
> <a href="home.htm" STYLE="color:#ffffff;text-decoration:none;"
> TARGET="_top">Tommy
> Ridder, Director&nbsp;</a></
>
>
> Netscape can't size the window without garbling the javascript.
>
>
> If I remove the style option, it works fine.
>
> I really would like to have some of my hyperlinks without the underlining
> and some with.  Does anyone have a solution?
>
>
> I know this is a browser compatibility problem, but could some one provide
> an example/solution
>
> ++++  CODE FOLLOWS   +++++++
>
> <HTML>
> <HEAD>
> <TITLE>Events</TITLE>
>
>
> <SCRIPT LANGUAGE="JavaScript">
> <!--HIDE
> function modDate(){
>
> revdate = new Date(document.lastModified);
> year = revdate.getYear();
> if (year > 1999)
>     year = year
> else
>     if (year < 90)
>         year = year+2000
>     else
>         year = year+1900;
> month = revdate.getMonth() + 1;
> day = revdate.getDate();
> var mon;
> if (month==0) mon = "January";
> if (month==1) mon = "January";
> if (month==2) mon = "February";
> if (month==3) mon = "March";
> if (month==4) mon = "April";
> if (month==5) mon = "May";
> if (month==6) mon = "June";
> if (month==7) mon = "July";
> if (month==8) mon = "August";
> if (month==9) mon = "September";
> if (month==10) mon = "October";
> if (month==11) mon = "November";
> if (month==12) mon = "December";
> document.write("&nbsp;&nbsp;This page last modified on " + mon + " " + day
+
> ", " + year);
>
> }
>
> // stop HIDING -->
>
> </SCRIPT>
> </HEAD>
>
>
> <BODY BGCOLOR="#FFFFFF" TOPMARGIN=0 LEFTMARGIN=0>
>
> <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="50%" BGCOLOR="#FFFFFF"
>
> <tr>
> <td ALIGN=RIGHT VALIGN=BOTTOM NOWRAP BGCOLOR="#CC0099"><b><font
face="Arial,
> Helvetica"><font color="#FFFFFF"><font size=5><a href="home.htm"
> STYLE="color:#ffffff;text-decoration:none;" TARGET="_top">Tommy
> Ridder, Director&nbsp;</a></font></font></font></b></td>
> </tr>
>
> </table>
> <!-- End of standard Header  -->
>
> Try to resize the window
> <br>
>
> <SCRIPT LANGUAGE="JavaScript">
> <!-- hide
>    modDate()
> // STOP HIDING -->
>
> </SCRIPT>
>
> <Br>
> See if it doesn't work
>
> </BODY>
> </HTML>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA