I have a form in multiple sections. The validation declarations are in the
head as the demos show. Problem is that I have a section where there are
multiple groups of dynamically created file inputs. The IDs vary and the
types of files for each group will vary. An Id may be like this
id="cv_fi_1_2". They are coded this way so that on the server side I can
handle the file types appropriately. Is there a trick where I could define
each group with it's own class or something and then tell the validator to
handle file inputs with a certain class attribute? Or to tell it to look for
a specific div ID containing the file inputs and validate them accordingly
to the group? Here is an example

All of these are in the same form and are generated server side number will
vary.

Group 1
Filter for .jpg | .gif

<input type="file" name="myfile" id="cp_fi_1_2034"
onchange="handleFile(this);" />
<input type="file" name="myfile" id="cp_fi_2_2123"
onchange="handleFile(this);" />
<input type="file" name="myfile" id="cp_fi_3_3456"
onchange="handleFile(this);" />
<input type="file" name="myfile" id="cp_fi_4_7890"
onchange="handleFile(this);" />


Group 2 
Filter for .mov | .mpg

<input type="file" name="myfile" id="cv_fi_1_1234"
onchange="handleFile(this);" />
<input type="file" name="myfile" id="cv_fi_2_5678"
onchange="handleFile(this);" />

Group 3 
Filter for .pdf

<input type="file" name="myfile" id="cb_fi_1_3210"
onchange="handleFile(this);" />
<input type="file" name="myfile" id="cb_fi_2_3345"
onchange="handleFile(this);" />
<input type="file" name="myfile" id="cb_fi_3_3456"
onchange="handleFile(this);" />



It's hard to declare these in the head and down here as well. Any
suggestions?



Thanks

Steffan

---------------------------------------------------------------
T E L  6 0 2 . 7 9 3 . 0 0 1 4 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
Steffan A. Cline  
[EMAIL PROTECTED]                             Phoenix, Az
http://www.ExecuChoice.net                                  USA
AIM : SteffanC          ICQ : 57234309
YAHOO : Steffan_Cline   MSN : [EMAIL PROTECTED]
GOOGLE: Steffan.Cline             Lasso Partner Alliance Member
---------------------------------------------------------------



Reply via email to