Hi all,

Suppose, i access the website(Main window), the site will load. Meantime,i want to open a new window (Child window -like a pop up) on the top of the main window. Now,the browser focus on the child window.In the mean time the main window will disable.

Please find below the following code. Its everything works fine. But, suppose the user enable the pop up blocker, the child window blocked. But my requirement is, the main window disable, the child window must open when the popup blocker turned on.

<HTML>
 <HEAD>
  <script>
  function modalWin() {
        if (window.showModalDialog) {       window.showModalDialog("christmas.swf","name","dialogWidth:918px;dialogHeight:500px");
        } else {
        window.open('christmas.swf','name','height=500,width=918,toolbar=no,directories=no,status=no,linemenubar=no,scrollbars=no,resizable=no ,modal=yes');
        }
    }
</script>
 </HEAD>

<body onLoad="modalWin();">
  This is Test!!
 </BODY>
</HTML>

Thanks!

You may use scripts like Facebox for a unblockable popup and use some JS for closing it when the page loads.
Note: Please use code-tag for codes.

Hi.... Thank you very much for your reply. In my understanding, suppose we using the link, its not a problem. I want to open a popup when the first page loads. Any comments? Some time i login this daniweb site, its loading some popup. I want like this... U seen?

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.