title: SCRIPT438: Object doesn't support property or method IE
body: <p>I have an option in my application where users can deactivate their profiles. Only admin can activate them again.</p>
  
  <p>I have a class <code>ActivateProfile</code> with two methods</p>
  
  <ul>
  <li><code>userExist(userName)</code> that checks if user with that userName exists and his/her profile is deactivated</li>
  <li>and <code>activateAccountByUser(userName)</code> that activate the profile of the user again</li>
  </ul>
  
  <p>I call a JavaScript function on the click event of an input type button. This code works fine on Chrome and Mozilla, but on Internet Explorer I get this error:</p>
  
  <blockquote>
    <p>SCRIPT438: Object doesn't support property or method userExist</p>
  </blockquote>
  
  <pre><code>function activateProf() {        
     var userName=document.getElementById("userName").value;
  
     if (userName == "") {
        alert("Полето е задолжително");
     } else {
        alert(userName + "1");
        ActivateProfile.userExist(userName, { callback:function(exist) {
           if (userName) {
              ActivateProfile.activateAccountByUser(userName);
              alert("User is activated");
           } else {
              alert("User does not exist");
           }
        }});
     }
  }
  </code></pre>
  
  <p>Here is the code for Activate profile class</p>
  
  <pre><code> public void activateAccountByUser(String userName) {
      try {
          Connection c = DBComm.getInstance().getConnection();
          Statement s = c.createStatement();
          ResultSet set = s.executeQuery("select * from accounts where userName = '" + userName + "' and isauthorized='2'");
  
          if (set.next()) {
              Statement st = c.createStatement();
              st.executeUpdate("update accounts set isauthorized='1' where userName='" + userName                    + "' and isauthorized='2'");
          }
          s.close();
          c.close();
      } catch (Exception ex) {
          java.util.logging.Logger.getLogger(ActivateProfile.class.getName()).log(Level.SEVERE, null, ex);
      }
  }
  
  public boolean userExist(String userName) throws SQLException {
      //true exist
      //false does not exist
      boolean existEmbg = false;
  
      try {
          Connection c = DBComm.getInstance().getConnection();
          Statement s = c.createStatement();
          ResultSet set = s.executeQuery("select * from accounts where userName = '" + userName + "' and isauthorized='2'");
  
          if (set.next()) {
              existEmbg = true;
          } else {
              existEmbg = false;
          }
          s.close();
          c.close();
      } catch (Exception ex) {
         java.util.logging.Logger.getLogger(ActivateProfile.class.getName()).log(Level.SEVERE, null, ex);
      }
      return existEmbg;
  }
  </code></pre>