Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Form Validation
kvarnerexpress
post Mar 17 2006, 09:18 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



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!
Go to the top of the page
 
+Quote Post
Unregistered 015
post Mar 17 2006, 11:49 PM
Post #2


Super Member
*********

Group: Members
Posts: 276
Joined: 4-August 05
Member No.: 10,273



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[i] 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...
Go to the top of the page
 
+Quote Post
Inspiron
post Mar 18 2006, 06:22 AM
Post #3


Trap Grand Marshal Member
***********

Group: Members
Posts: 1,203
Joined: 25-March 05
Member No.: 4,883



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.

QUOTE(ciroxyz @ Mar 18 2006, 07:49 AM) *

for i from 0 to 40 do {
no.of.matches=0;
for j from 0 to 40 do {
compare project/task[i] 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?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Free Windowsxp Sp2 Cd From Microsoft(13)
  2. *** Click Here To Get Your Free Hosting ***(1)
  3. Form To Php Mail. Attachment(14)
  4. Loop Through Form(8)
  5. How To Make A Search Form And Php Code?(10)
  6. Have Diferences Of Performance Form Ps2 Full Console To Mini-ps2?(8)
  7. Problem With Java Script Popup Form(1)
  8. What Is A Computer Form Factor(1)
  9. Php Ftp Upload Form(1)
  10. I Liked This Form Builder(4)
  11. Updating Php File Through A Web Form(5)
  12. Brand New Motherboard Form Factor Coming Out?(2)
  13. Form Not Returning Correct Email Address(5)
  14. How To Make Form Nested In Internet Explorer ?(2)
  15. Html Form!(4)
  1. Registration Form?!(6)
  2. Help With Form Actions.(1)
  3. Gahhh This Isn't Going Well Please Help!(12)
  4. Application Form [approved](2)
  5. Vb 2008 Linking To Another Form..(0)
  6. Perl For Automated Web Form Search(1)
  7. Design A Contact Form In Flex Part 1(0)
  8. Text Size In "fill-in" Form Blanks(2)
  9. About Posting Form(2)
  10. Design A Contact Form In Flex Part 2(0)
  11. Counter Strike Problem(2)
  12. Design A Contact Form In Flex Part 3(2)
  13. Submitting A Form In Flex (follow Up Of Sm's Tut)(2)


 



- Lo-Fi Version Time is now: 11th October 2008 - 07:45 AM