Hidding of Browser window
Posted: Wed Sep 30, 2009 3:42 am
Dear Friends
I am using that code
hs.Expander.prototype.getPrintPage = function() {
// We break the closing script tag in half to prevent
// the HTML parser from seeing it as a part of
// the *main* page.
return "<html>\n" +
"<head>\n" +
"<title>Temporary Printing Window</title>\n" +
"<script>\n" +"function step1() {\n" +
" setTimeout('step2()', 10);\n" +
"}\n" +
"function step2() {\n" +
" window.print();\n" +
" window.close();\n" +
"}\n" +
"</scr" + "ipt>\n" +
"</head>\n" +
"<body onLoad='step1()'>\n" +
"<img src='" + this.content.src + "'/>\n" +
"</body>\n" +
"</html>\n";
};
This code is using for the printing of images in Highslide, now the problem is that when i click to print the desired image firstly image appears in new window then printing dialog box will be opened than after getting the print the the new temporary window will be closed automatically after 10 neno seconds.
But my requirement is that when i click the print button i automatically get the printing dialog box and no temporary window will be opened which will carry the image.
so kindly give me any suggestion but my idea is that i want to hide the Temporary Window, which works but in hidden form
so user will directly got the print dialog box.
kindly give me the code which will hide the temporary window what code can i use for it
Waiting for you reply.
Regards
I am using that code
hs.Expander.prototype.getPrintPage = function() {
// We break the closing script tag in half to prevent
// the HTML parser from seeing it as a part of
// the *main* page.
return "<html>\n" +
"<head>\n" +
"<title>Temporary Printing Window</title>\n" +
"<script>\n" +"function step1() {\n" +
" setTimeout('step2()', 10);\n" +
"}\n" +
"function step2() {\n" +
" window.print();\n" +
" window.close();\n" +
"}\n" +
"</scr" + "ipt>\n" +
"</head>\n" +
"<body onLoad='step1()'>\n" +
"<img src='" + this.content.src + "'/>\n" +
"</body>\n" +
"</html>\n";
};
This code is using for the printing of images in Highslide, now the problem is that when i click to print the desired image firstly image appears in new window then printing dialog box will be opened than after getting the print the the new temporary window will be closed automatically after 10 neno seconds.
But my requirement is that when i click the print button i automatically get the printing dialog box and no temporary window will be opened which will carry the image.
so kindly give me any suggestion but my idea is that i want to hide the Temporary Window, which works but in hidden form
so user will directly got the print dialog box.
kindly give me the code which will hide the temporary window what code can i use for it
Waiting for you reply.
Regards