bestprotop / jquery-multifile-plugin

Automatically exported from code.google.com/p/jquery-multifile-plugin
0 stars 0 forks source link

Id of master input control is changed to id of first slave control on deletion of first file from list. #158

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have input file control with id ctl00_PlaceHolderMain_fUpload. Html is as 
followed before uploading files.

<INPUT id=ctl00_PlaceHolderMain_fUpload class="multi MultiFile-applied" size=35 
type=file >

After selecting two file, controls are created with following html. Id of 
Master is ctl00_PlaceHolderMain_fUpload and that of slaves are respectively 
ctl00_PlaceHolderMain_fUpload_F1, ctl00_PlaceHolderMain_fUpload_F2, which works 
fine.

<INPUT id=ctl00_PlaceHolderMain_fUpload class="multi MultiFile-applied" size=35 
type=file >
<INPUT id=ctl00_PlaceHolderMain_fUpload_F1 class="multi MultiFile-applied 
MultiFile" size=35 type=file >
<INPUT id=ctl00_PlaceHolderMain_fUpload_F2 class="multi MultiFile-applied 
MultiFile" size=35 type=file >

If I remove second file from list , Id of master remains as it is i.e. 
ctl00_PlaceHolderMain_fUpload and first slave ctl00_PlaceHolderMain_fUpload_F1, 
which is correct.
<INPUT id=ctl00_PlaceHolderMain_fUpload class="multi MultiFile-applied" size=35 
type=file >
<INPUT id=ctl00_PlaceHolderMain_fUpload_F1 class="multi MultiFile-applied 
MultiFile" size=35 type=file >

If I delete first file from list, Id of master become 
ctl00_PlaceHolderMain_fUpload_F1 instead of ctl00_PlaceHolderMain_fUpload. Id 
of second file remains as it is i.e ctl00_PlaceHolderMain_fUpload_F2, which is 
correct.
<INPUT id=ctl00_PlaceHolderMain_fUpload_F1 class="multi MultiFile-applied 
MultiFile" size=35 type=file >
<INPUT id=ctl00_PlaceHolderMain_fUpload_F2 class="multi MultiFile-applied 
MultiFile" size=35 type=file >

Deleting first element from list always causes id of master input file element 
to change to first slave element. This causes validation based on the id of 
master input element to fail.

What version of the plugin/jQuery are you using?
PLUGIN VERSION: jQuery Multiple File Upload Plugin v1.48 - 2012-07-19
JQUERY VERSION:1.3.2

On what browser(s) or operating system?
BROWSER(S): IE 8 compat view
Operating System : Windows 7.0

Original issue reported on code.google.com by RajeshJP...@gmail.com on 13 Aug 2012 at 10:41

GoogleCodeExporter commented 9 years ago
This issue causes Required field validator to throw null exception on Master 
input file control as id of control is changed to that of first slave element.

Original comment by RajeshJP...@gmail.com on 13 Aug 2012 at 10:52