P
pbd22
Hi.
I have been wrestling with a problem for over a week now and I think I
need to breathe
and rethink my approach. I am wondering if somebody wouldn't mind
telling me how
they would tackle the problem (rather than tell me why my code is
failing)?
The problem:
* I have an upload form that allows a user to browse and select
multiple files for upload.
* The form has several elements on it for data input. All elements
are reused for each file.
* A user clicks on a file in the upload queue, activating the
elements for this particular file.
He then adds text, selects radio buttons, etc. When he is done, the
information is saved
for that given file when he moves to the next file. If he returns
to a file that already has
user-defined data for it, then that data is loaded.
This is what I am trying to do. The way I am currently approaching the
problem is:
* When a user adds a new file, an addFile function is triggered that
fills a multidimensional
array fileList[the file number][data elements on the page]
* When a user clicks on a file for upload, selectFile is triggered
which both a) loads previously
added user-defined data if it exists and b) dynamically adds the
editFile() function to the data
elements passing the clicked-on file as a parameter.
* editFile updates the form data (if need be).
I am not looking for code (although demos are always appreciated) but
simply a fresh perspective on how to tackle this. I am trying to
rethink my current code but, if you want to take a look at it, let me
know.
Thanks for your patience.
I have been wrestling with a problem for over a week now and I think I
need to breathe
and rethink my approach. I am wondering if somebody wouldn't mind
telling me how
they would tackle the problem (rather than tell me why my code is
failing)?
The problem:
* I have an upload form that allows a user to browse and select
multiple files for upload.
* The form has several elements on it for data input. All elements
are reused for each file.
* A user clicks on a file in the upload queue, activating the
elements for this particular file.
He then adds text, selects radio buttons, etc. When he is done, the
information is saved
for that given file when he moves to the next file. If he returns
to a file that already has
user-defined data for it, then that data is loaded.
This is what I am trying to do. The way I am currently approaching the
problem is:
* When a user adds a new file, an addFile function is triggered that
fills a multidimensional
array fileList[the file number][data elements on the page]
* When a user clicks on a file for upload, selectFile is triggered
which both a) loads previously
added user-defined data if it exists and b) dynamically adds the
editFile() function to the data
elements passing the clicked-on file as a parameter.
* editFile updates the form data (if need be).
I am not looking for code (although demos are always appreciated) but
simply a fresh perspective on how to tackle this. I am trying to
rethink my current code but, if you want to take a look at it, let me
know.
Thanks for your patience.