Re: how to make IE show client side JavaScript output?
| From: | _lallous | Date: | Mon, 05 Nov 2001 08:43:02 +0000 |
| Subject: | Re: how to make IE show client side JavaScript output? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73452@lists.php.net to get a copy of this message | ||
this code will help you out:
<body id='body' onload='alert(document.all.body.outerHTML);'>
<script language="JavaScript">
<!--
for (i=0;i<10;i++)
document.write(i + '<br>');
//-->
</script>
</body>
it will show you the new produced HTML code in addition to your javascript
code.
"Moloko" <moloko@witty.com> wrote in message
news:20011102122317.2417.qmail@pb1.pair.com...
> interesting one here for y'all
>
> if you use client side JavaScript to write HTML to the browser, eg
> <script language="JavaScript"
> document.write ('<b>Hello world!</b>');
> </script>
> then look at the page source from IE, the page source will show you
exactly
> what I've typed above, whereas if you view the page source from Netscape
> 4.7, it shows this in the source:
> <b>Hello world!</b>
> (this is the way I ewould expect and want it work)
>
> Unfortunately the (rather complex) script I'm writing does completely
> different stuff in Netscrape so looking at the page source thru there to
see
> what's going on is hopeless - is there any way to make IE behave like NS
in
> this respect and actually show the correct JavaScript output, rather than
> the JavaScript code itself??
>
> Cannot believe that NS4.7 is actually better at doing something than IE!!!
>
> --
> Moloko
> 'When the going gets weird, the weird turn pro' - Dr Gonzo
> GCM/CS/IT/MC d-- S++:- a-- C++ U--- P+ L !E W+++$ N+ K+ w+++$ M+ PS+++ PE-
> PGP- t+ 5- X-- R* tv++ b+++ DI++++ D G e h-- r++ y++
>
>