Moodle
  1. Moodle
  2. MDL-26940

Javascript code window.open not working in IE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.2.5, 2.3.2
    • Fix Version/s: 2.2.6, 2.3.3
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide

      Test pre-requisites

      • To be tested on IE8, IE9, Firefox, Chrome
      • Debug level has to be set to developer

      Test steps

      1. Save the file test_popup.php in the root of your Moodle, and access it in your browser
      2. Make sure the invalid buttons throw an error but still open the popup
      3. Make sure the valid ones open a popup
      4. Disable the debug
      5. Make sure all buttons open a popup without throwing an error
      Show
      Test pre-requisites To be tested on IE8, IE9, Firefox, Chrome Debug level has to be set to developer Test steps Save the file test_popup.php in the root of your Moodle, and access it in your browser Make sure the invalid buttons throw an error but still open the popup Make sure the valid ones open a popup Disable the debug Make sure all buttons open a popup without throwing an error
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-26940-master
    • Rank:
      16569

      Description

      File: /moodle/lib/javascript-static.js
      Line: ~1036
      Code: windowobj = window.open(fullurl,args.name,args.options);

      Error Message: Invalid argument

      It prevents pop up window to open in IE8, IE7. It looks like there is some problem with args.name and args.options as window.open(fullurl) works.

      http://stackoverflow.com/questions/710756/ie8-var-w-window-open-message-invalid-argument

      1. test_popup.php
        0.9 kB
        Frédéric Massart

        Issue Links

          Activity

          Hide
          Dan Poltawski added a comment -

          Seems to still apply on 2.3, adding labels. I think this should be converted to YUI functions.

          Show
          Dan Poltawski added a comment - Seems to still apply on 2.3, adding labels. I think this should be converted to YUI functions.
          Show
          Paul Holden added a comment - The same problem was the cause of MDL-31499 , see the following comment made there; http://tracker.moodle.org/browse/MDL-31499?focusedCommentId=146842&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-146842
          Hide
          Adrian Greeve added a comment -

          Hi,

          I had a look at this. The code looks good. The patch works well (I tried it with IE9 and Firefox).

          Thanks Fred.

          Show
          Adrian Greeve added a comment - Hi, I had a look at this. The code looks good. The patch works well (I tried it with IE9 and Firefox). Thanks Fred.
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Dan Poltawski added a comment -

          Thanks Fred, i've integrated this now.

          Show
          Dan Poltawski added a comment - Thanks Fred, i've integrated this now.
          Hide
          Michael de Raadt added a comment -

          Test result: Success!

          Tested in 2.2, 2.3 and master with FF, IE8, IE9 and Chrome.

          Show
          Michael de Raadt added a comment - Test result: Success! Tested in 2.2, 2.3 and master with FF, IE8, IE9 and Chrome.
          Hide
          Dan Poltawski added a comment -

          Congratulations, you've done it!

          Nf n erjneq sbe fhpprfshy vagrtengvba vagb guvf jrrxf eryrnfr, V pna abj qvfpybfr gb lbh gur rkvfgnapr bs shapgvba fge_ebg13(), gb tb va lbhe gbbyxvg nybat jvgu uggc://cuc.arg/znahny/ra/shapgvba.tmtrgff.cuc

          Cyrnfr qb abg nyybj guvf vasbezngvba gb cnff shegure.

          Show
          Dan Poltawski added a comment - Congratulations, you've done it! Nf n erjneq sbe fhpprfshy vagrtengvba vagb guvf jrrxf eryrnfr, V pna abj qvfpybfr gb lbh gur rkvfgnapr bs shapgvba fge_ebg13(), gb tb va lbhe gbbyxvg nybat jvgu uggc://cuc.arg/znahny/ra/shapgvba.tmtrgff.cuc Cyrnfr qb abg nyybj guvf vasbezngvba gb cnff shegure.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: