Jul 20, 2008

Form Validation

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > .NET ( ASP.net VB.net )

free web hosting

Form Validation

kvarnerexpress
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!

Reply

Unregistered 015
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...

Reply

Inspiron
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?

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : validation


    Looking for form, validation

Searching Video's for form, validation
advertisement



Form Validation



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE