kvarnerexpress 0 Report post Posted March 17, 2006 I have a timesheet type form that has 40 different row - each row has two dropdowns, one for a project and one for a task, and a dropdown box for each day of the week. Once a project and task has been selected, hours spent on that task each day of the week are entered into the text boxes.What I would ideally like to do is, before I send this page for processing on my asp page (which involves saving the data back to the database), I'd like to check whether or not the user has entered the same project/task combination on multiple rows.....the dropdowns on each row are named project1-project40, task1-task40, mon1-mon40 etc.I'm using VBScript for the server side scripting, but I'll happily incorporate a section of Javascript code if that will offer me a simpler solution.Any ideas or suggestions are more than welcome here! Share this post Link to post Share on other sites
Unregistered 015 0 Report post Posted March 17, 2006 here is the pseudocode, you do the implementation: for i from 0 to 40 do { no.of.matches=0; for j from 0 to 40 do { compare project/task to project/task[j] if it is a match increase no.of.matches for 1 } } if no.of.matches>40 report error //only compared to ifself sorry, can't do any better, I forgot a lot of those things, since I do someting else now. I hope you can get something out of this... Share this post Link to post Share on other sites
Inspiron 0 Report post Posted March 18, 2006 Hey kvarnerexpress, I guess we'll get a clearer picture of what you are trying to ask for when you post your codes as well. Because there's different methods of doing, having your codes as reference will solve your problem faster. Your task should be rather simple to validate with just Javascript. I may be able to help you if you provide the codes of your work. for i from 0 to 40 do { no.of.matches=0; for j from 0 to 40 do { compare project/task to project/task[j] if it is a match increase no.of.matches for 1 } } Firstly, please place your codes in the [-CODE-] [-/CODE-] tags.Secondly, you codes seemed pretty weird. Or is it actually not a code? Share this post Link to post Share on other sites