...

View Full Version : Netscape Versions and document.write



rccprof
01-12-2003, 08:17 AM
Does anyone know what was the last version of Netscape that displays your actual document.write output in the page source (instead of the document.write code itself) when you view it from within the browser? I found this to be a nice debugging tool at times, but recent versions of Netscape no longer do this. Not even Netscape 4.79 does it, but I believe earlier versions of Netscape 4.x do. I'd like to be as up to date as possible and still have that feature. Anyone?

Thanks.

PauletteB
01-12-2003, 08:40 PM
V. 4.76 does what you mentioned, but I don't know if it's the last version which does it...

That is, 4.76 shows the results of the javascript while the new Netscape shows the code. That what you meant?

rccprof
01-13-2003, 10:26 AM
Yep, that's what I meant -- thanks a lot, you just saved me a lot of downloading, installing, and testing, and I'm on a slooooow modem! Unless anyone else knows of a later version that does the same thing, I think this issue is closed.:thumbsup:

Dalziel
01-13-2003, 10:44 AM
Originally posted by rccprof
Yep, that's what I meant -- thanks a lot, you just saved me a lot of downloading, installing, and testing, and I'm on a slooooow modem! Unless anyone else knows of a later version that does the same thing, I think this issue is closed.:thumbsup:

Why do you need to know that, you can make Netscape 4.76 display <script language="javascript" type="text/javascript" src="main.js"></script> instead of the result of the JS. I don't know why you'd want to though.

PauletteB
01-13-2003, 01:56 PM
An escape tool perhaps... Example

New Netscape (and IE) source code
<script language="JavaScript" type="text/javascript">
<!--
document.write(unescape("%3Chtml%3E%0D%0A%0D%0A%3Chead%3E%0D%0A%3Cmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text/html%3B%20charset%3Diso-8859-1%22%3E%0D%0A%3Ctitle%3EFoo%20Bar%3C/title%3E%0D%0A%3C/head%3E"));
// -->
</script>

Netscape 4.76 source code
<BASE HREF="file:/C|/Coding Forum/">
<HTML>

<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Foo Bar</TITLE>
</HEAD>


Hope that's what rccprof meant...

rccprof
01-13-2003, 10:41 PM
I teach a beginning JavaScript course and I think it is a useful debugging tool for students who are trying to generate a bunch of HTML with document.write's to have a handy way of seeing exactly what their document.write's are generating (character by character) instead of just getting errors on their page and having a bigger mystery to solve. On the other hand, my network administrators are hesitant to install old versions of browsers in our lab for me, so I am trying to placate them by at least finding the most recent one that will do this.

Does that make more sense?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum