popup - how to open new window through javascript when pop up is blocked -


How can I open a new window via javascript when popups are blocked in IE and Firefox?

The code below is:

  & lt;% @page language = "c #" AutoEventWireup = "false"%> & Lt ;! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.0 Transcription // N" & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; SessionRedirect & lt; / Title & gt; & Lt; Meta name = "generator" content = "Microsoft Visual Studio .Net 7.1" & gt; & Lt; Meta name = "CODE_LANGUAGE" content = "C #" & gt; & Lt; Meta name = vs_defaultClientScript content = "javascript" & gt; & Lt; Meta name = vs_targetSchema content = "http://schemas.microsoft.com/intellisense/ie5" & gt; & Lt; / Head & gt; & Lt; Body MS_POSITIONING = "grid layout" & gt; & Lt; Form method = "post" name = "frmRedirect" & gt; & Lt; Input type = "hidden" name = "email" value = "& lt;% = session [" email "]. ToString ()% & gt;" / & Gt; & Lt; Input type = "hidden" name = "pass" value = "& lt;% = session [" pwd "]. Tostrings ()%> / & Gt; & Lt; Input type = "hidden" name = "user" value = "& lt;% = session [" user "]. ToString ()%> / & Gt; & Lt; / Form & gt; & Lt; Script type = "text / javascript" & gt; If (frmRedirect.User.value == "P") {window.open ("", "partner", "height = 650, width = 1075, left = 100, top = 100, position = 1, scrollbar = 1, Location = 1, toolbar = 1; resizable = 1 "); FrmRedirect.target = "partner"; FrmRedirect.action = "http: //pli.cmsstag/partnerzone/index.aspx"; Document.frmRedirect.submit (); Location.replace ("index.aspx"); } Else {window.open ("", "Student", "height = 650, width = 1075, left = 100, top = 100, position = 1, scrollbar = 1, location = 1, toolbar = 1; resizable = 1 "); FrmRedirect.target = "student"; FrmRedirect.action = "http: //pli.cmsstag/studentzone/index.aspx"; Document.frmRedirect.submit (); Location.replace ("index.aspx"); } & Lt; / Script & gt; & Lt;% Session Remove ("Registration"); Session.Remove ("user"); Session.Remove ("User-ID"); Session.Remove ("UserLoggedIn"); Session.Remove ("AgentCode"); Session.Abandon (); & Gt%; & Lt; / Body & gt; & Lt; / Html & gt;  

All the above code is working properly, as long as the browser has not blocked the popup. I'm trying to open a new window through window. Open, please see the code above. I want the window to open in any case, if pop-up blocker should also open it please help!

Pop-ups created by window can be blocked by pop-up blockers. You can add a new developer layer that works like a pop up to solve it.

There are some problems with Div popup

The dropdown lists come in the way of these pop ups.

etc.

Many of the issues of a div pop up have been resolved in the above page.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -