By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,344 Members | 1,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,344 IT Pros & Developers. It's quick & easy.

Popup window losing focus

P: 1
I have a print preview button on an 2.0 page that opens a new window with a pdf version of what's currently on the screen so the user can print it out.
However, this window loses focus because an iframe on the parent page refreshes itself after the popup page loads. Is there any way to keep the iframe from refreshing or to restore focus to the popup?

Below is the code I'm using to open the new window.
Expand|Select|Wrap|Line Numbers
  1. Dim url As String = "frmPrintPreview.aspx"
  2. btnPrintPreview.OnClientClick ='" & url & "','printpreview','height=420,width=550,toolbar=yes,status=yes,scrollbars=yes,resizable=yes');"
This is the code for the iframe:

Expand|Select|Wrap|Line Numbers
  1.     <iframe id="FrameLeft" runat="server" name="FrameLeft" scrolling="no" style="border-right: silver 1px inset; border-top: silver 1px inset; z-index: 110; left: 603px; border-left: silver 1px inset;       width: 464px; border-bottom: silver 1px inset; position: absolute; top: 32px; height: 675px" visible="false"></iframe>
Apr 23 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.