ICEfaces
  1. ICEfaces
  2. ICE-4383

Javascript object 'this' does not work with onFocus event and ice:inputText

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      FF 3.0.8, IE7

      Description

       <ice:form>
                      <ice:inputText id="idWhereLocationTextBox" styleClass="inputTextBox width90"
                                     value="#{myBean.whereLocation}"
                                     onfocus="javascript:clearTxt(this.id);"
                                     onblur="javascript:getTxt(this.id);"/>
                  </ice:form

      and

       <script>
                      function clearTxt(varI){
                          alert('onFocus:' + varI);
                      }

                      function getTxt(varI) {
                            alert('onBlur:' + varI);
                      }
        </script>

      In Firefox 3.0.8, the alert will return "onFocus:undefined" and in IE7 "onFocus j_id11" which is the ID of the form tag.

        Activity

        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Joel Krebs made changes -
        Salesforce Case [50070000008LGft] [50070000008LGft, 50070000008n65I]
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.8.1 [ 10170 ]
        Assignee Arturo Zambrano [ artzambrano ] Mircea Toma [ mircea.toma ]
        Ken Fyten made changes -
        Assignee Priority P1
        Assignee Arturo Zambrano [ artzambrano ]
        Tyler Johnson made changes -
        Attachment SC8209.war [ 11670 ]
        Tyler Johnson made changes -
        Field Original Value New Value
        Salesforce Case [50070000008LGft]
        Tyler Johnson created issue -

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: