Spry

Specify an invalid value

You can specify a value that registers as invalid if the user selects a menu item that is associated with that value. For example, if you specify -1 as an invalid value, and you assign the value to an option tag, the widget returns an error message if the user selects that menu item.

  1. Assign a negative value to an option tag, for example:
    <option value="-1"> ------------------- </option>
  2. Add the invalid option and the value you specified to the widget constructor, as follows:
    <script type="text/javascript">
    	var selectwidget1 = new Spry.Widget.ValidationSelect("selectwidget1", {invalidValue:"-1"});
    </script>

Comments

Comments are no longer accepted for Spry 1.4. Spry 1.6 is the current version. To discuss Spry 1.4, please use the Adobe forum.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/en_US/Spry/1.4/WS10A3288C-24E2-4bdb-A3D7-90D43AAB71B9.html