window.open not working in i.e 6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • groeny
    New Member
    • Aug 2006
    • 5

    window.open not working in i.e 6

    Hi all,

    I am trying to build a pop-up into a Web page. The pop-up should open when
    clicking a button. It works fine on Mozilla, but Internet Explorer
    refuses to open the pop-up. How can I make it work?
    The code is:
    <input type="button" value="Help"onC lick="window.op en('mda.php','H elpMe','width=2 00,height=200,l eft=200,top=200 ,resizable')"/>

    I have change it many ways - e.g. tried opening a htm, html file instead of php. It still works on Mozilla and not I.e
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    put a space in before onClick
    spell onClick onclick

    Comment

    • groeny
      New Member
      • Aug 2006
      • 5

      #3
      Thanks for looking at it. I'm afraid it didn't solve the problem. Any other ideas?

      Comment

      • groeny
        New Member
        • Aug 2006
        • 5

        #4
        I get the same when using a <href> that calls a javascript function? The function gets called but doesn't open the popup?

        as per below

        <a href="#" onClick="newWin dow(1);">Contac t Us</a><br>

        <SCRIPT language="Javas cript">
        // declare a new JavaScript variable
        var popWindow;
        // declare a new function, newWindow
        function newWindow(winID ) {

        // declare variable winURL, setting it to the name of the PHP file
        // and accompanying data.
        var winURL = "mda.php?winID= " + winID;
        // If the popup window does not exist, or it is currently closed,
        // open it.
        if (!popWindow || popWindow.close d) {




        popWindow = window.open(win URL,'popWindow' ,'dependent,wid th=200,height=2 00,left=150,top =100');
        }
        // If the popup window is already open, make it active and update
        // its location to winURL.
        else {
        popWindow.focus ();
        popWindow.locat ion = winURL;
        }
        }
        </SCRIPT>

        Comment

        • iam_clint
          Recognized Expert Top Contributor
          • Jul 2006
          • 1207

          #5
          the code you pasted actually worked fine for me you got a popup blocker doing something?

          Comment

          • groeny
            New Member
            • Aug 2006
            • 5

            #6
            No first thing I checked - I did have to re install IE a while ago - I wonder wether that had anything to do with it.

            Comment

            • iam_clint
              Recognized Expert Top Contributor
              • Jul 2006
              • 1207

              #7
              Possibly it worked fine with IE 6

              Comment

              • groeny
                New Member
                • Aug 2006
                • 5

                #8
                Thanks for your help - I have reinstalled Ie 6, still nothing and then instlled ie7 beta version still nothing...

                Comment

                • pinging
                  New Member
                  • May 2006
                  • 2

                  #9
                  Originally posted by groeny
                  Thanks for your help - I have reinstalled Ie 6, still nothing and then instlled ie7 beta version still nothing...
                  This is due to enhanced security in IE6 onwards. The local file isnt within application's scope and hence wont open.

                  I am still trying to figure it out. Any solutions????

                  Comment

                  Working...