logo

New Response

« Return to the main article

You are replying to:

    • avatar
    • LL
    • Posted on Wed 30 Jun 2004

    More and more i use this way to validate forms.

    I create a field called JSRunner wich I set as Computed for display. Before the field i write <script language=JavaScript> and after the field </script>. And sets it's to pass thru html. Should look something like this.

    <script language="JavaScript> [JSRunner] </script>

    Then in my submit button i have a simple code like this.

    errorMsg := @If( myField = "" ; "No value" ; "" ); @if( errorMsg = "" ; @Success ; @Return( @SetField( "JSRunner" ; "alert('" + errorMsg "')" ))) ; @Command([FileSave]) ; @Command([FileCloseWindow]) ;

    / LL

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: