-2

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!

Edited by Nick Evan: Fixed formatting

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by gpmmuthu
0

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.

Edited by mike_2000_17: Fixed formatting

0

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!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.