Re: Netscape help required - correct message
by "Henry Boleszny" <seaeagle(at)one.net.au>
|
Date: |
Mon, 24 Jul 2000 09:59:44 +1000 |
To: |
"hwg-techniques" <hwg-techniques(at)hwg.org>, "Kehvan M. Zydhek" <kehvan(at)zydhek.net> |
|
todo: View
Thread,
Original
|
|
Hi Kehvan,
Thanks for your reply. Glad the second version was clearer; don't know what
happened to the first one :-)! Naturally, I will honour any copyright you
wish to place on the scripts.
Also, thanks for the code. I am a real novice at computer coding but I get
the general idea behind what your script is doing. The head section
contains the variable and declaratives for a simple routine that directs the
browser to an appropriate format -- depending on whether it is able to read
Java and/or CSS. This is activated by the "enter" link, which refers to the
"head" code for the appropriate directory.
However, the link refers to ASP pages and I know less about that than I do
about Java/Javascript. Am I right in assuming that I can change the
extensions to .html without the code breaking?
You also refer to a file://--. What is this and what should I change it to,
if at all?
As soon as funds permit, I intend getting a Java resource and catching up to
the rest of you! I saw a book on HTML 4 that showed me just how niave I
really am. I hadn't even heard of DHTML and am just getting familiar with
XHTML and XML.
Do I have a short and sharp learning curve ahead!!
Cheers and thanks again!
-----Original Message-----
From: Kehvan M. Zydhek [SMTP:kehvan(at)zydhek.net]
Sent: Sunday, 23 July 2000 10:41 PM
To: Henry Boleszny; hwg-techniques(at)hwg.org
Subject: Re: Netscape help required - correct message
Hi Henry,
Now your message makes sense! :-)
Here's what I did recently for a site that I built that has two versions of
the code. The first version, written in HTML-4 and using extensive CSS-2
code, works about as I expect it to in MSIE 4.x, MSIE 5.x, AOL 4, AOL 5,
Opera 4.x, and Netscape 6/Mozilla. The second version of the site is written
to produce nearly the same effect using NO JavaScript and only HTML-3.2.
This version works for Netscape 3.x, Netscape 4.x, WebTV, and Opera 3.x.
Now, that summarizes the results of the browsers I have on my system, most
installed with default settings. What about browsers I don't have, or if the
visitor has JavaScript turned off? Simple: the detection algorythm detects
this and sends browsers to the appropriate structure anyway.
Here's the detector... This is placed in the first page visited, such as a
welcome page. Once they click off this page, they're in the appropriate
structure (/html3/ or /html4/):
<.script language="JavaScript" type="text/javascript">
<!--
var agt=navigator.userAgent.toLowerCase();
var htmldir = 'html3'
if ((document.getElementById) || (document.all) &&
(agt.indexOf("webtv") == -1)) {htmldir='html4';}
file://-->
<./script>
The above script is placed in the head of the document. You'll notice WebTV
is singled out -- that's because it claims to be able to use CSS, but really
can't do it properly.
What this does is determine which browsers go where. If the browser can
interpret either the Document.GetElementByID DOM (Net6/Moz, OPR4x, IE5x,
AOL5), or if it can interpret the Document.All (IE4/5, AOL4/5), then it's
assigned to go to the HTML4 directory. Since Netscape 4 uses a different
DOM, it fails this test and gets sent to the HTML3 directory.
Now, later in the body of the page:
<.script>
<!--
document.write('<a href="' + htmldir +
'/home.asp"><b>ENTER</b></a>')
file://-->
<./script>
<.noscript>
<.a href="html3/home.asp"><b>ENTER</b></a>
<./noscript>
This segment writes the <a href> tag in the scripted portion. The htmldir
variable being either html3 or html4. This send people to the proper
structure. Now for the kicker: if they have MSIE5 (or any other browser, for
that matter) with JavaScript turned off, they go to the
HTML3 structure, since the pages in that area were specifically written
WITHOUT JavaScript. Therefore, with a small amount of code, all browsers,
including future browsers and ones that I don't know about, are taken care
of properly.
Hope this helps!
Kehvan M. Zydhek
PS: Remove the . from the tags -- added JUST IN CASE! :-)
----- Original Message -----
From: "Henry Boleszny" <seaeagle(at)one.net.au>
To: <hwg-techniques(at)hwg.org>
Sent: Saturday, July 22, 2000 20:21
Subject: Netscape help required - correct message
> Hi there, experts and lurkers
>
> Please excuse the repeat sending of this message. My Outlook became
corrupt
> when I loaded Communicator and won't send text-based e-mails. I somehow
> copied only part of the message last time. Sorry about that :> !
>
>
>
> For the last two years, I have been kidding myself that our business web
> site was something to write home about. As long as its viewed in IE, it
> isn't too bad. I just found out what the site looked like in Netscape ...
> Anyone feeling masochistic can wander over to
http://www.seaeagle.aunz.com,
> particularly if they have Netscape.
>
> Some of the feedback I've already received turned out to be far too polite
> :-/ !
>
> My problem is that I use CSS extensively and my external links don't seem
to
> be working. That's contributing to the "dog's breakfast" that this site
has
> become. Can anyone suggest the best way to deal with this?
>
> The other problem is that I now need a sniffer program to point surfers to
> the right version (once I finish modifying our site for Netscapists). The
> only version I had resided on a floppy diskette, long since zip archived
and
> now irrecoverably damaged. I know nothing about Java - except that there
> are allegedly a lot of people who surf without out it. There are
> alternative ways of getting Netscape users to their version of the site -
> the most basic being a plain hyperlink.
>
> Is there a site where I can get some info on cross-browser issues and
> designing for Netscape in particular? I've neglected this for so long in
my
> myopic site work that I have fallen way behind!
>
> Any suggestions, on or off list, are greatly appreciated!
>
> Henry John & Amy Boleszny
> Partners
> Sea Eagle Publications
> ABN 24 604 217 122
>
> E-mail: seaeagle(at)one.net.au
> Web: http://www.seaeagle.aunz.com/
> Phone/Fax: (07) 5529 2661
> Mail/Locale: 1/9 Possum Court, Coombabah QLD 4216, Australia
>
>
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA