Andy, I too would like to know how to fix this when using the validator
Javascripts. In most cases it appears to be benign, but irritating. I've got
on or two forms that it really does break though.

Hope someone has an clue.

- Richard

-----Original Message-----
From: Huang, Andy [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2003 2:19 PM
To: '[EMAIL PROTECTED]'
Subject: RE: javascipt error in IE


No one experience this problem???

-----Original Message-----
From: Huang, Andy
Sent: Thursday, July 03, 2003 1:46 PM
To: '[EMAIL PROTECTED]'
Subject: javascipt error in IE


I got an "Error: Object Expected" in IE 6, but run without any problem in
Netscape or Opera.

I have a login form with onsubmit="return validateLoginForm(this);"
to validate the login email address and password (I have included the html
souce code snippet below)

My guess is that the IE browser having problem to read staticJavascript.jsp
when it load the page.

Any help will be appreciated


<form name="loginForm" method="post" action="/Login.do" onsubmit="return
validateLoginForm(this);">
<table border="0" width="100%">
  <tr>
    <th align="right">
      Email Address:
    </th>
    <td align="left">
      <input type="text" name="email" maxlength="27" size="25" value="">
    </td>
  </tr>

  <tr>
    <th align="right">
      Password:
    </th>
    <td align="left">
      <input type="password" name="password" maxlength="18" size="16"
value="">
    </td>
  </tr>

  <tr>
    <td align="right">
      <input type="submit" value="Submit">
    </td>
    <td align="left">
      <input type="reset" value="Reset">
    </td>
  </tr>
</table>
</form>

<script type="text/javascript" language="JavaScript">
  <!--
  var focusControl = document.forms["loginForm"].elements["email"];

  if (focusControl.type != "hidden") {
     focusControl.focus();
  }
  // -->
</script>



<script type="text/javascript" language="Javascript1.1">
<!-- Begin

     var bCancel = false;

    function validateLoginForm(form) {

        if (bCancel)
      return true;
        else
       return validateEmail(form) && validateMaxLength(form) &&
validateMinLength(form);
   }

    function email () {
     this.aa = new Array("email", "<li>Email Address is an invalid e-mail
address.</li>", new Function ("varName", " return this[varName];"));
    }

    function maxlength () {
     this.aa = new Array("password", "<li>Password cannot be greater than 16
characters.</li>", new Function ("varName", "this.maxlength='16';
this.minlength='3';  return this[varName];"));
    }

    function minlength () {
     this.aa = new Array("password", "<li>Password cannot be less than 3
characters.</li>", new Function ("varName", "this.maxlength='16';
this.minlength='3';  return this[varName];"));
    }

//End -->
</script>

<script language="Javascript1.1" src="staticJavascript.jsp"></script>








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to