Wrox Home  
Search P2P Archive for: Go

  Return to Index  

interdev_programming thread: IE6 and the "onbeforeserverevent()"


Message #1 by dean.hastings@u... on Mon, 15 Apr 2002 10:04:38
My Intranet application uses design time controls and 
the "onbeforeserverevent()" event to validate controls before form is 
posted to the server. Here is an example of the validation code:

<script LANGUAGE="javascript">
<!--

// perform client-side input validation 
// before returning to server
function thisPage_onbeforeserverevent() {

   // check for maximum Feedback length
   if (document.thisForm.Textbox1.value.length>1000) {
      alert("Feedback must be less than 1000 characters!");
      thisPage.cancelEvent=true;
      return;
   }
}
//-->
</script>

This works fine with IE5.5 but not IE6. In IE6 the following error message 
is displayed:
"'document.thisForm.Textbox1.value' is null or not an object"

Does anyone know how to fix this problem?

Any help is appreciated,
Dean. 

  Return to Index