CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    India
    Posts
    26

    Popup window is getting minimized

    Hi

    I have a main window with a button and when i click on it it opens another window, after which i have given an alert message when this alert comes the popup window gets minimized.How to stop this??

    This is my code

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    
    <html>
    <head>
    	<title>Untitled</title>
    </head>
    <script language="javascript">
    
    function test(){
    var win=window.open();
    alert("hi");
    }
    </script>
    
    <body>
    <form name=f1>
    
    <input type="button" value="click" onClick="test()"> 
    
    </form>
    </body>
    
    </html>
    When the alert "hi" comes the window which is opened gets minimized .How to stop that

    Thanks
    Sreenath

  2. #2
    Join Date
    Mar 2005
    Location
    India
    Posts
    102

    Post Re: Popup window is getting minimized

    "When the alert "hi" comes the window which is opened gets minimized .How to stop that"

    srinath,

    But the window is not getting minimized, i am using IE version 6.0

    You can try this:
    put the alert message before the window popup statement,

    regards,

    manju

  3. #3
    Join Date
    May 2002
    Location
    India
    Posts
    143

    Re: Popup window is getting minimized

    try this:

    Code:
    <script language="javascript">
    
    function test(){
    var win=window.open();
    win.focus();
    }
    </script>
    Anupam.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured