Are you using the validation plugin?

On 18 maio, 05:33, ciupaz <luigi.zambe...@gmail.com> wrote:
> Hi all,
> I have this validate code to validate a textbox if the user select a
> combo value:
>
> <script type="text/javascript">
>
>     $(document).ready(function() {
>                 $("form#2form").validate({
>                 rules: {
>                 viaAltro: {
>                     required: "#AltraVia:checked"
>                 }
>             },
>
>             messages: {
>         viaAltro: {
>                     required: "Insert 'Altra via'"
>                 }
>
>             }
>         })
>     });
> </script>
>
> and this is the HTML:
>
> <select name="viaFornitura" id="viaFornitura">
>                 <option>Seleziona la via</option>
>                  <option id="AltraVia">Altro</option>
> </select>
>
> <label for="viaAltro">Altra via</label>
>         <input name="viaAltro" id="viaFornituraAltro" type="text" />
>
> but it doesn't work.
> Where the problem?
>
> Thanks a lot.
>
> Luigi

Reply via email to