IE Window Always Opens Minimized

G

Guest

Hi. I have a hyperlink control (lnkViewLogData) which is assigned the
following attribute when the page loads...

Me.lnkViewLogData.Attributes.Add("onClick", _

"javascript:window.open('Input_New_Record_CustomerInformation.aspx?CustomerID=" & Me.lblCustomerID.Text & "','myWin','');")

As you can see, when this attribute is assigned the hyperlink is formatted
to pop open another window. The problem is that when the window opens, it
briefly displays on the screen (for 1 second) and then minimizes. Therefore
whenever users open this window they must first click the link, then click on
the new window down on their taskbar.

I'm not sure if the new window is actually MINIMIZING or it is just not
becoming the active window, but either way can anyone suggest how I can fix
this so that the new window becomes the active window and properly displays
on the user's screen? Thanks.
 
G

Guest

Dune...
Thanks for that very informative link. I've updated the syntax as suggested
by the website, adding the alwaysRaised feature, but the window still opens
and then hides behind the parent window. It's strange because as you can see
I've also added the scrollbars feature which works correctly and displays
scrollbars in the window, but the window continues to open minimized dispite
the alwaysRaised feature. Am I missing something here or formatting this
incorrectly? Thanks!

Me.lnkViewLogData.Attributes.Add("onClick",
_"window.open('Input_New_Record_CustomerInformation.aspx?CustomerID=" &
Me.lblCustomerID.Text & "','_blank','scrollbars,alwaysRaised');")
 
P

Phillip Ian

I tested your code and it seems to work fine for me. The child window
appears on top and focused.

I don't think I changed anything important (just some names), but just
in case, here's my code:

lnkOpenChild.Attributes.Add("onClick",
"window.open('child.aspx?customerID=42','_blank','scrollbars,alwaysRaised');")

Could there be something on your Input_New_Record_CustomerInformation
page that is causing this? Do you use any startup javascript or
anything?
 
G

Guest

Phillip Ian,

Yes, in the <Head> tag of my page I have the following...

<SCRIPT language="Javascript">
function clearAttrs()
{
document.all.DataGrid1.style.borderCollapse = "separate";
}
function setAttrs()
{
document.all.DataGrid1.style.borderCollapse = "collapse";
}
</SCRIPT>

Could this be affecting anything? Thanks for your reply too.
 

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

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top