function openMyWindow(){ var PagetoPopup; PagetoPopup= '<%=Session["app_path"]%>' + "MyWindowName.aspx"; var newWin = null; newWin = window.open(PagetoPopup,"MyPopupWindow","toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no, resizable=yes,titlebar=0"); if ( (newWin == null) || (typeof(newWin) =="undefined") || (typeof(newWin .location.hash) != "string") ) { alert('Please ensure that pop-ups are enabled!'); } else { if (self.name != 'MyPopupWindow') { top.close(); // Use this if you want to close the main/parent window ; otherwise comment out this code } } I hope this is what you wanted.The code notifies the user if the popup blocker is activated, so that the user can de-activate it and try to open the window again. Vuks
Vuks
Posts
-
Popup blocker window -
OpenCurrentDatabase..HANGING!!! ...Automation MS Access 2003 [modified]Hi, I am using C#.NET to create an instance of MS Access 2003. I try to open my Access Report, but the Application just hangs as soon as I get to the part where I open my Database. Here is part of my code: oAccess = new Access.ApplicationClass(); //No problem if(!oAccess.Visible) oAccess.Visible = true; //No problem sDBPath = "C:\\Reporting.mdb"; oAccess.OpenCurrentDatabase(sDBPath,false, ""); //PROBLEM IT HANGS!!! // Preview the report: oAccess.DoCmd.OpenReport(sReport,Access.AcView.acViewPreview, moMissing, moMissing, Access.AcWindowMode.acWindowNormal, moMissing) My problem is that it stops on the line that attempts to open the DB AND DOES NOT CONTINUE FURTHER.Ohh by the way I wrote the same code in VB6 and it worked just fine.Please help. Vuks -- modified at 9:15 Thursday 6th July, 2006