Spread ASP.NET 6.0 Product Documentation
Doing a Quick Validation Before Postback
Send Feedback
Spread ASP.NET 6.0 Product Documentation > Client-Side Scripting Reference > Scripting Overview > Some Simple Uses of Client Scripting > Doing a Quick Validation Before Postback

Glossary Item Box

You can use client-side scripting in Spread to get the Update button and map your own click event for it. This allows you to perform client-side validations before the data gets posted to the server. If it succeeds, then the Update postback occurs. The following code sets up this validation.

JavaScript Copy Code
<script language="javascript">
  function window.onload()
  {
    var updbtn = FpSpread1.all("FpSpread1_Update");
    updbtn.onclick = test;
  }

  function test()
  {
    if(succeeds)
      doPostBack(FpSpread1.id, "Update");
  }
</script>

Return to the list of Some Simple Uses of Client Scripting.

© 2002-2012 GrapeCity, Inc. All Rights Reserved.