[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/demos/quickstart/protected/pages/Controls/Samples/TCustomValidator/ -> Home.page (source)

   1  <com:TContent ID="body">
   2  
   3  <script type="text/javascript"><!--
   4  function myValidationFunction(sender, parameter)
   5  {
   6      if(parameter == 'test')
   7          return true;
   8      else
   9          return false;
  10  }
  11  --></script>
  12  
  13  <h1>TCustomValidator Samples</h1>
  14  
  15  <table class="sampletable">
  16  
  17  <tr>
  18  <td class="samplenote">
  19  Custom validator with default settings:
  20  </td>
  21  <td class="sampleaction">
  22  <com:TTextBox ID="TextBox1" />
  23  <com:TCustomValidator
  24      ValidationGroup="Group1"
  25      ControlToValidate="TextBox1"
  26      ClientValidationFunction="myValidationFunction"
  27      OnServerValidate="serverValidate"
  28      Text="You must enter 'test'." />
  29  <com:TButton Text="Submit" ValidationGroup="Group1" />
  30  </td>
  31  </tr>
  32  
  33  <tr>
  34  <td class="samplenote">
  35  Custom validator with client-side validation disabled:
  36  </td>
  37  <td class="sampleaction">
  38  <com:TTextBox ID="TextBox2" />
  39  <com:TCustomValidator
  40      ValidationGroup="Group2"
  41      EnableClientScript="false"
  42      ControlToValidate="TextBox2"
  43      ClientValidationFunction="myValidationFunction"
  44      OnServerValidate="serverValidate"
  45      Text="You must enter 'test'." />
  46  <com:TButton Text="Submit" ValidationGroup="Group2" />
  47  </td>
  48  </tr>
  49  
  50  <tr>
  51  <td class="samplenote">
  52  Custom validator with focus-on-error enabled and dynamic display:
  53  </td>
  54  <td class="sampleaction">
  55  <com:TTextBox ID="TextBox3" />
  56  <com:TCustomValidator
  57      ValidationGroup="Group3"
  58      ControlToValidate="TextBox3"
  59      ClientValidationFunction="myValidationFunction"
  60      OnServerValidate="serverValidate"
  61      FocusOnError="true"
  62      Text="You must enter 'test'." />
  63  <com:TButton Text="Submit" ValidationGroup="Group3" />
  64  </td>
  65  </tr>
  66  
  67  
  68  </table>
  69  
  70  </com:TContent>


Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7