Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1592

t:inputCalendar do not work on IE9

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.10
    • 1.1.11
    • Calendar
    • None

    Description

      Original report from user list (Admirolas):

      Hello,

      I have tried my JSF application, that uses MyFaces Tomahawk 1.1.10 with Internet Explorer 9. After click on calendar button I get JavaScript error: DOM Exception: INVALID_CHARACTER_ERR (5). IE9 JavaScript debugger shows, that exception is thrown in calendar/popcalendar.js line 164. There is call to: document.createElement and passes html tag as parameter.

      Maybe there is some workaround? A patch? Should I migrate to 1.2.10?

      The problem is this line (popcalendar.js):

      iframe = document.createElement(
      "<iframe"
      + " src='javascript:false;'"
      + " id='" + overDiv.id + "_IFRAME'"
      + " style='visibility:hidden; position: absolute; top:0px;left:0px;'"
      + "/>");

      IE9 is more strict, and this code does not work. The solution is do this instead:

      iframe = document.createElement("iframe");
      iframe.setAttribute("id", overDiv.id + "_IFRAME'");
      iframe.setAttribute("src", "javascript:false;")
      Element.setStyle(iframe, "visibility:hidden; position: absolute; top:0px;left:0px;");

      Tested in IE6, IE8, IE9, Firefox 3.6.17 and Opera 10.10. Also checked quirksmode dot org compatibility table.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: