Need some fresh ideas

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.
 
P

Peter Michaux

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.

Do you have a demo or some screen shots that shows your UI?

Peter
 
P

pbd22

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.

Do you have a demo or some screen shots that shows your UI?

Peter

Thanks for the response Peter.
I have uploaded my screen shot to photobucket here:

<a href="http://photobucket.com" target="_blank"><img src="http://
i103.photobucket.com/albums/m156/pbd22/UI.jpg" border="0" alt="Photo
Sharing and Video Hosting at Photobucket"></a>

The unexpanded "edit" tabs are more of the same - lots of radio
buttons.
One has a map which accepts coordinates.

Thanks a ton for your thoughts.
Peter
 
B

Bart Van der Donck

pbd22 said:
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.

This should be a quite classical RDBMS design scheme, looks like MS
SQL Server in your case. Based on your demo (*) I would suggest the
following structure:

Table [users]:
usersID|name|username|password|remarks|email|blanco|blanco2

Table [uploads]:
uploadsID|filename|usersID|title|description|tags|categoriesID|
languagesID|radio1|radio2|morespecs...|blanco1|blanco2

Table [categories]:
categoriesID|description

Table [languages]:
languagesID|description

Relations:
[users]![usersID] to [uploads]![usersID]: 1 to N
[uploads]![categoriesID] to [categories]![categoriesID]: N to 1
[uploads]![languagesID] to [languages]![languagesID]: N to 1

Indices:
[users]![usersID]
[uploads]![uploadsID]
[uploads]![usersID]
[uploads]![categoriesID]
[uploads]![languagesID]
[categories]![categoriesID]
[languages]![languagesID]
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]

I think there is no need for javascript here; actions for _adding_ a
new file:
- user enters data
- asp server script validates the input
- asp inserts in database
- asp stores the uploaded file in writable folder, and refers from MS
SQL Server to it (like unique file name or ID)
* 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).

Actions for _editing_ a file's specifications could be:
- user clicks on file in list
- XMLHttpRequest loads data from SQL Server into the form elements
(**)
- user edits data
- asp validates data and does update-actions

(*) http://i103.photobucket.com/albums/m156/pbd22/UI.jpg
(**) This is the modern strategy. A more old-style approach would take
you to a GET request like /edit.aspx?uploadsID=5 and let the form fill
by asp.

I think the actions for _delete_ should be evident.

I don't see any need for javascript on your demo page, except:

- Collapse/Expand buttons at the right
- XMLHttpRequest if you follow the modern strategy from the _editing_
procedure
- Confirm box for the delete actions

Hope this helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top