habib009pk Posted September 30, 2009 Share Posted September 30, 2009 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 Quote Link to comment Share on other sites More sharing options...
habib009pk Posted October 2, 2009 Author Share Posted October 2, 2009 Then plz give me any suggestion what can i do for it i also modify the code such as " window.resizeTo( 0,0 );\n" + " window.moveTo(300, 300)\n" + " setTimeout('step2()', 10);\n" + "}\n" + This code reduce the Browser window and move the window to my desired location, i wrote that code bcz of the temporary window hide before the print dialog but the problem is the code is running successfully but the print dialog appears w.r.t the temporary window if it appears in left then print dialog appears also in left but below the tempoaray window. which give me not the full result kindly give me any suggestion for my problem. which will hide the temporary window either in visible form or before the print dialog. Thanks and Regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.