473,320 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

js document.write() includes & Netscape 4.x

Hi, all --

I have several pages which use the same components over and over; I'd
like to do these components as includes. I can't do server-side stuff
with my ISP, so I thought I would use client-side javascript: a series
of 'document.write()' statements to build the HTML fragment.

This works just great in most browsers ... but Netscape 4 doesn't seem
to like them. Sometimes the page doesn't display at all. Sometimes it
stops loading where the include gets read. The behavior is erratic and
inconsistent; the same page may render sometimes and sometimes not, or
will when 'refresh' is hit.

I've tested with 4.08, 4.7, and 4.79 ...

Tried both defining js functions in the <head>, and loading external js
files in the <body> ... same results. Example here:

http://members.accessbee.com/jkwasnik/green/green.html
Anyone know a work-around?

Thanks much,

John

Jul 23 '05 #1
2 1351
jo**********@dgs.ca.gov wrote:
I have several pages which use the same components over and
over; I'd like to do these components as includes. I can't
do server-side stuff with my ISP, so I thought I would use
client-side javascript: a series of 'document.write()'
statements to build the HTML fragment.

<snip>

Bad plan. Look into HTML pre-processors, they can save you all the work
and produce reliable results.

Richard.
Jul 23 '05 #2
Richard --

Thanks. But in this case, all I can use are client-side means.

I have solved the problem, however.

Jonathan Little (http://www.LittleWorksStudio.com) pointed out a quirk
in Netscape 4.x -- using a 'style=' attribute in document.written tags
is iffy. Netscape was REPEATING the lines with such tags, but
corrupting the attribute to 'Ttyle=' ... this left an un-closed <div>,
and the page stopped rendering. Removing 'style=' from all the
document.written tags in my includes solved the problem.

John

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: 2obvious | last post by:
This is a pipe dream, I realize, but I'm trying to emulate the functionality of the W3C DOM-supported document.getElementsByTagName method under the very nightmarish Netscape 4. Through some...
4
by: Yvan J. Gagnon | last post by:
I am encountering a strange problem in Netscape 7 with a CFM file I am trying to troubleshoot (the page is working fine in NS Communicator and IE). Below is a sample of the problematic line of...
1
by: nickolausp | last post by:
When embedding a JavaScript document.write within a JavaScript document.write in Netscape 4.x (example below), the text is written out of logical order. <script type="text/javascript"> <!--...
6
by: David List | last post by:
I'm having a problem using different properties of the document object in the example javascripts in my textbook with browsers that identify themselves as using the Mozilla engine. One example of...
3
by: Catherine Lynn Smith | last post by:
I am creating a webpage with dhtml <DIV> layers and I want a link on one layer to modify the content on another but I seem to keep running into errors. Basically I create a layer in the middle...
4
by: Geoff Wilkins | last post by:
I must confess I only come here when I have a problem - so my apologies if this has been raised before: Using my IE v.6 browser, document.write doesn't convert HTML entities (e.g. &apos;, &amp;) to...
10
by: InvisibleMan | last post by:
Hi, Thanks for any help in advance... Okay, I have the JS listed below that calls for the display of the (DIV) tag... cookie function not included, as don't feel its necessary but you'll get the...
5
by: s_m_b | last post by:
function saveState() { document.write (" | <a href = 'myhomepage.asp? view=mhp&amp;action=save&amp;pb="); >> document.write (document.phone.style.display.value); document.write ("'>save view</a>"); };...
2
by: Monte Gardner | last post by:
At my company, we have a javascript function that uses document.write() calls to create an INPUT tag with type set to "image". The image that it is downloading comes from a dynamic image server,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.