Article View: aus.computers.java
Article #818Re: Netscape and Javascript Write
From: RockMonkey
Date: Sun, 30 Apr 2000 00:00
Date: Sun, 30 Apr 2000 00:00
49 lines
2446 bytes
2446 bytes
Netscape doesn't like multiple document.write commands.
Instead, assign all of your text to a variable and then do one
document.write of that variable. For example:
function write_footer(date)
{
var temp = '';
temp +='<TABLE WIDTH=630 BORDER=1 ALIGN="center"><TR>';
temp +='<TD ALIGN="center" BGCOLOR="Black" STYLE="font-size: 10pt;
font-family: Arial; font-style: italic; font-weight: normal; color: Yellow;
text-decoration: none;">© Robert Larkin 1999-2000</TD>';
temp +='<TD ALIGN="center" BGCOLOR="Black" STYLE="font-size: 10pt;
font-family: Arial; font-style: italic; font-weight: normal; color: Yellow;
text-decoration: none;">Last Updated : '+date+'</TD>';
temp +='<TD ALIGN="center" BGCOLOR="Black" STYLE="font-size: 10pt;
font-family: Arial; font-style: italic; font-weight: normal; color: Yellow;
text-decoration: none;">e-mail:<A HREF="mailto:rob_larkin@hockeymail.com"
STYLE="font-size: 10pt; font-family: Arial; font-style: italic; font-weight:
normal; color: Yellow; text-decoration:
none;">rob_larkin@hockeymail.com</A></TD>';
temp +='</TR></TABLE></TD></TR></TABLE>';
document.write(temp);
}
Have fun!
Reece
Robert Larkin <robert@rlarkin.freeserve.co.uk> wrote in message
news:8ege7u$4tn$1@news5.svr.pol.co.uk...
> The following page uses an external Javascript to write headers and footer
> to the page - http://www.hockey-stats.fsnet.co.uk/links_page.html.
>
> This works like a charm in IE5 but I was wondering if there was a way to
> make it compatible with netscape 4.06. Is this possible?
>
> Thanks in advance
> Rob Larkin
>
>
>
Technical Details
Message-ID:
<_uQO4.437$X4.1115@newsfeeds.bigpond.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8ege7u$4tn$1@news5.svr.pol.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb3cb,cc27900b5e423dc7 X-Google-Attributes: gidfb3cb,public X-Google-Thread: 10d6db,cc27900b5e423dc7 X-Google-Attributes: gid10d6db,public From: "RockMonkey" <johno@fishnet.com> Subject: Re: Netscape and Javascript Write Date: 2000/04/30 Message-ID: <_uQO4.437$X4.1115@newsfeeds.bigpond.com> X-Deja-AN: 617413162 References: <8ege7u$4tn$1@news5.svr.pol.co.uk> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Trace: newsfeeds.bigpond.com 957076538 139.134.158.80 (Sun, 30 Apr 2000 16:35:38 EST) Organization: Telstra BigPond Internet Services (http://www.bigpond.com) X-MSMail-Priority: Normal NNTP-Posting-Date: Sun, 30 Apr 2000 16:35:38 EST Newsgroups: aus.computers.java,comp.lang.javascript