Link to home
Start Free TrialLog in
Avatar of brihol44
brihol44

asked on

Spry validation with file fields

I understand how to use Spry in DW to validate text fields, checkboxes, radios and so fourth but how do you validate a file field with the same validating features (CSS Styles)? I try just using a textfield and then change it to a file field but Spry gets confused.

Thanks
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
 
<span id="sprytextfield2">
            <label>
            <input type="file" name="company_logo" id="company_logo" />
            </label>
            <span class="textfieldRequiredMsg">A value is required.</span></span>
 
<script type="text/javascript">
<!--
 
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur"]});
 
//-->
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of gops1
gops1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial