473,387 Members | 1,431 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,387 software developers and data experts.

Javascript output code in Netscape 7x and IE 6x

It once was necessary to type "view-source" before the URL in Location
to view the javascript original coding for Netscape. The default was
the output code of
the script. Now the default is the original script code. Is there a
way to see the original coding in Netscape 7x and/or IE 6x without
falling back to an old version of NS ?

That is,when I "view source" I want to see:

<body>
Most cats have fur
</body>

Rather than:

<body>
<script language='javascript'>
var message='Most cats have fur';
document.write(message);
</script>
</body>
Jul 20 '05 #1
3 3012


Albert Spencil wrote:
It once was necessary to type "view-source" before the URL in Location
to view the javascript original coding for Netscape. The default was
the output code of
the script. Now the default is the original script code. Is there a
way to see the original coding in Netscape 7x and/or IE 6x without
falling back to an old version of NS ?

That is,when I "view source" I want to see:

<body>
Most cats have fur
</body>

Rather than:

<body>
<script language='javascript'>
var message='Most cats have fur';
document.write(message);
</script>
</body>


With Netscape 7.1 or Mozilla you can use Ctrl-A to select all the
displayed page content and then use view selection source in the context
menu, you will get the both the script elements and the output they have
produced that way.
Netscape/Mozilla also have the DOM inspector which doesn't show
serialized source code but a tree view of the document which is very
helpful. Again you will see both a script elements and its output in
that view.

For IE you could use a bookmarklet e.g.
javascript: alert(document.documentElement.outerHTML); void 0

Of course with both browsers dynamic manipulation of the document is
possible without using document.write and even after the page has been
loaded so what the above ways show is a current snapshot.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
Martin Honnen <ma*******@yahoo.de> wrote in message news:<40********@olaf.komtel.net>...

With Netscape 7.1 or Mozilla you can use Ctrl-A to select all the
displayed page content and then use view selection source in the context
menu, you will get the both the script elements and the output they have
produced that way.
Netscape/Mozilla also have the DOM inspector which doesn't show
serialized source code but a tree view of the document which is very
helpful. Again you will see both a script elements and its output in
that view.

For IE you could use a bookmarklet e.g.
javascript: alert(document.documentElement.outerHTML); void 0

Of course with both browsers dynamic manipulation of the document is
possible without using document.write and even after the page has been
loaded so what the above ways show is a current snapshot.


"View selection source" did the job for Netscape 7.1 . "javascript:
alert(document.documentElement.outerHTML); void 0" for IE6x gave me a
page with only the top part of the source and had no scrollbar. How
do I see the entire source with the latter??
Thanks!!!
Albert Spencil
Jul 20 '05 #3
Albert Spencil wrote:
Martin Honnen <ma*******@yahoo.de> wrote in message news:<40********@olaf.komtel.net>...


<--snip-->
"View selection source" did the job for Netscape 7.1 . "javascript:
alert(document.documentElement.outerHTML); void 0" for IE6x gave me a
page with only the top part of the source and had no scrollbar. How
do I see the entire source with the latter??


javascript:window.clipboardData.setData('text',doc ument.documentElement.innerHTML);void%200

And then paste it into a text editor. There are other ways to get it,
but that seems to be the easiest.

Put a textarea on the page, set its value to
document.documentElement.innerHTML and scroll down.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #4

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

Similar topics

13
by: Gaurav | last post by:
Hello, i have some java script with in html. It runs fine on IE 6.0 but doesnt run on netscape 7.1 Can someone tell me whats the problem ? And how can i solve it. here is the url ...
13
by: Csaba Gabor | last post by:
I'm not talking javascript hara-kiri here. I've got a database of web pages or snippets I've created and I'd like to display them in a table. So on my server (in PHP) I take all the files, and...
15
by: Davide R. | last post by:
Ciao a tutti, vi spiego il mio problema Ho una pagina HTML che referenzia un CSS esterno. Ho alcuni elementi HTML che appartengolo ad una classe (chiamiamola "class1"). Avrei la necessitą,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.