Saving Of View Source Content Of Child Window, By File - SaveAS

M

manohara

Respected Sir,

I am facing the problem of saving the view source content
as an html page. I have one html file that consists the
"Print" button on clicking the button through the
javascript i am creating another window and i am writing
the html content(image and text) to newly opened window
through javascript document.write() method.

My problem is i wanted to save the content of the newly
opened window thorugh the File->SaveAs (web page complete)
with text and image so i can carry this page to somewhere
for to take the printout, but when i did like that always
it is saving the contents of the main window. what could
be the reason? how to approach this?

I have pasted the souce,what it looks like.

<html>
<head><title>To Save Child Window</title>
<script language="javascript">
function CallPrint(){

var win = window.open('','','');
win.document.open();
var strHTML = '<html><head><title>The Child
Window</title></head>';
strHTML = strHTML + '<body><form name=Frm><img
src="../img/abc.gif"><h2>My Photo - Manu</h2></form>';
strHTML = strHTML + '</body></html>';
win.document.writeln(strHTML);
win.document.close();
}
</script>
</head>

<body>
<form name="Frm" id="Frm">
<input type="button" name="Print" value="Print"
onclick="CallPrint();">
</form>
</body>
</html>

Regd,
Manu
 
R

Robert Aldwinckle

[cross-posting from ie6.browser to inetexplorer.scripting]

The ie6.browser newsgroup doesn't really support programming related
questions like this and it is unclear if your coding is related to your problem.
Therefore I am cross-posting to a newsgroup which specializes
in scripting.

< >

FWIW I can point out that after a recent update that some pages
are no longer able to be saved in .mht format (not the same type as
the one you want but it does indicate that there is a problem in that area).
A possible workaround for that problem may be to use File, Send >
Page by E-mail... to Outlook Express and then use it to save the file.
Apparently you can save the file with an extension of .mht if desired.


HTH

Robert Aldwinckle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top