View Question
 Question
 Subject: Javascript/html question Category: Computers > Programming Asked by: purplepit-ga List Price: \$30.00 Posted: 30 Mar 2003 13:27 PST Expires: 29 Apr 2003 14:27 PDT Question ID: 183315
 Could you please help supply the code for the following.... I need to create the following..and the results need to be in a table!!!! Your page should have a form in which you can enter a student registration number, a name, 6 tutorial marks, 1 coursework mark, and one exam mark. The maximum marks and weighting are as follows: Maximum mark Weighting Tutorial 1 3 3 Tutorial 2 3 3 Tutorial 3 4 4 Tutorial 4 3 3 Tutorial 5 3 3 Tutorial 6 4 4 Coursework 100 20 Exam 100 60 You should provide a reset button and a calculate button. When the calculate button is pressed, the average coursework mark (tutorials and coursework), the exam mark, and the total average for the module should be calculated and displayed at the top of the form. You should check the the form is complete with registration number correctly formatted before calculating the averages, and use a pop-up window to let the user know which fields are missing or incorrectly formatted when necessary. Please note that you may have to use the parseInt() function: total=parseInt(number1)+parseInt(number2); to force the addition of number1+number2 and not concatenate both numbers. Thank you Request for Question Clarification by theta-ga on 30 Mar 2003 14:19 PST Hi purplepit-ga, I need a couple of clarifications to answer your question satisfactorily. First of all, you ask that we check whether the registeration number is correctly formatted or not. To do this, we need to know the format of the registeration number. How big is it? Does it contain alphabets, or digits or both? Also, I believe that once the user presses the calculate button, you want three pieces of information shown : The Avg Coursework marks, The exam mark and the Avg. module marks. But in this case, the exam marks will be exactly what the user entered in the form. Is this correct? Finally, the result will be displayed in three textboxes inside a table. Is this OK? The remaining part of your question is pretty straightforward, so once I have your clarifications, I will begin work on it at once. Regards, Theta-ga :-) Clarification of Question by purplepit-ga on 31 Mar 2003 00:47 PST Hi there, And thanks for your help. In response to you queries, please note... 1) Firstly, let's assume that the student registration number is all NUMBERS, and is '9' numbers long. 2) Yes, the exam mark will be the same as entered, and the three textboxes inside a table are fine. Regards Anthony Request for Question Clarification by theta-ga on 31 Mar 2003 07:41 PST Hi purplepit-ga, Just an update. Have finished most of the work. You will have the solution soon. One query though, in the question you say we are to calculate the average, but you have also provided weights for each item. I assume that you want the weighed average calculated, instead of the plain vanilla one? Regards, Theta-ga :-) Clarification of Question by purplepit-ga on 31 Mar 2003 10:11 PST Hi again, Yes the weighed average is correct!! and thanks..... Clarification of Question by purplepit-ga on 01 Apr 2003 13:02 PST Hi there Theta-ga!! Just wondering if you received my answer to your last query??? Purplepit