Asad Khan wrote:
[color=blue]
> I have an HTML file that has a call to a Javascript function in it as
> follows:
>
> <!-- bunch of stuff -->
> <script type="text/javascript">doXMLFromString()</script>
> <!-- bunch of stuff -->
>
> Now I make a copy of this HTML file by creating a new window and writing
>
> var body = document.body.innerHTML;[/color]
body isn't a very good variable name. Does the second body refer to the
body of the page, or, to the variable body you just created?
var newBody = document.body.innerHTML;
var newBody = newBody.replace('offending script statement here','');
[color=blue]
> printWin.document.write (body);[/color]
printWin.document.write(newBody);
[color=blue]
> How can I stop this?[/color]
Simply replace the strings in the newBody that you don't want duplicated.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq/