473,320 Members | 1,914 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.

Embeded JavaScript document.write's in Netscape 4.x

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">
<!--
document.write('<script
type=\"text/javascript\">document.write(\'111\');<\/script>222');
document.write('333');
//-->
</script>

Netscape 4.x produces "111333 222". Notice the space between the
elements and that the elements are not in order.

The correct output should be "111222333" as produced by all versions
of IE, Netscape 3.x and below, and Netscape 6.x and above.

Has anyone run into this and/or found a solution to this issue?
Please explain why this is happening and how I can fix/work-around it.

I need embeded scripts.
I need them to work in Netscape 4.x
And I need them to be in one long document.write string so please
don't ask me to seperate them.

Thank you.

Nickolaus Benjamin Padgett
ni**********@turner.com
Jul 20 '05 #1
1 2183
nickolausp wrote:
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">
<!--
document.write('<script
type=\"text/javascript\">document.write(\'111\');<\/script>222');
document.write('333');
//-->
</script>

Netscape 4.x produces "111333 222". Notice the space between the
elements and that the elements are not in order.

<SNIP>

Ensuring the embedded script tag is the last thing written by a single
call to document.write seems to achieve correct rendering results when
tested under NS 4.72. The corollary is that placing extra content after
an embedded '<\/script>' end tag, or including extra parameters in the
document write call to achieve the same result, produces predictable
rendering failures under NS4.

Any solution to an NS4 bug, however, needs to be tested against actual
document structure and conditions in which it is expected to function.

Good luck,
Dom

Jul 20 '05 #2

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

Similar topics

8
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
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...
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
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.