Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions JAVASCRIPT FOR ONLINE QUIZ

Have Programming Question? Ask it here!
 
 
 


vanan
JAVASCRIPT FOR ONLINE QUIZ
1 Answer(s)      2 years and 2 months ago
Posted in : JavaScript Questions


i m creating a set of online questionnaire consist of 12 questions with choice of answers from 0-6.i've done creating a html codes.but have to calculate percentage based on total scores.my problem is i want to use get element by id function to read the score.if any questions is missed out there must be an alert box require user to answer all questions before proceeding to calculate score.below is a sample of questionnaire which i need to modify to include get element id function.I REALLY NEED YOUR HELP IN THIS.PLS

<form method="GET" action="post.html">`print("code sample");`

    Choose one from this group<br>
    RED <input type = "radio" name = "rad1" value = "0" >
    BLUE <input type = "radio" name = "rad1" value = "1" >
    GREEN  <input type = "radio" name = "rad1" value = "2" >
    YELLOW <input type = "radio" name = "rad1" value = "3">
    BROWN <input type = "radio" name = "rad1" value = "4">
    <br>
    And one from this group<br>
    PINK<input type = "radio" name = "rad2" value = "0" >
    PURPLE<input type = "radio" name = "rad2" value = "1" >
    GREY<input type = "radio" name = "rad2" value = "2" >
    BLACK<input type = "radio" name = "rad2" value = "3" >
    WHITE <input type = "radio" name = "rad2" value = "4">
    <br><br>
    <input type = "button" value = "Calculate Score" onclick ="calc()">
    </form>

    <script type = "text/javascript">

    var numOfGroups = 2;  // the number of radio button groups - here 2

    function calc() {
    var score = 0;
    for (var j=1; j<=numOfGroups; j++) {
    var f = document["myform"]["rad"+j];
    for (var i=0; i<f.length; i++) {
    if (f[i].checked) {
    score += Number(f[i].value/72 *100));
    }
    }
    }

    alert ("You scored "  + score);

    }
    </script>

Advertisement
View Answers

May 26, 2013 at 2:25 PM


You can check this link. Everything has been explained stepwise and you can implement the score in percentage. The source code is also available there. Your problem will be solved within minutes. Interactive Quiz with javaScript



Related Tutorials/Questions & Answers:
JAVASCRIPT FOR ONLINE QUIZ
JAVASCRIPT FOR ONLINE QUIZ  i m creating a set of online questionnaire consist of 12 questions with choice of answers from 0-6.i've done creating... = "text/javascript"> var numOfGroups = 2; // the number of radio button
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
Advertisements
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
Online quiz mini project
Online quiz mini project  Sir i need a online quiz program coding using java servlet, jdbc odbc connection with ms. access. If possible send that source code to me. Thank you
Online Quiz Application in JSP
Online Quiz Application in JSP  ... are going to implement of Online quiz application using of JSP. Step 1: Create... quiz question and answer form using with JSP or JDBC database.  Here
Failed to run Online Quiz Application in JSP - JSP-Interview Questions
Failed to run Online Quiz Application in JSP   Hi, I have been following your following link to run the online quiz application, but I failed... your question. Thanks  Hi, I cannot run your online quiz
quiz
question has a complexity (difficulty) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question to a quiz. Define the giveQuiz method
Need Help in creating online quiz application using JSP - JSP-Servlet
Need Help in creating online quiz application using JSP  Hi, i am creating online Quiz application using JSP and MySQl ,Apache 6 in Netbeans IDE. i... of database mySql-->select * from quiz
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.  please provide online quiz program coding using jsp, jdbc...: http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml
Should we go for javascript or applets for online exam project using java
Should we go for javascript or applets for online exam project using java  Hi, I am new to java and i am working on online examination project.As soon as the candidate login successfully a window pop up should appear
How to Create Quiz Application using iPhone
How to Create Quiz Application using iPhone  Hi, I am learning iphone application Programming Language. my question is that how to create a quiz application using iPhone. Please provide online reference to study and example
identification quiz - Java Beginners
identification quiz  what is the html java code for a identification quiz? plz help me..  Hi Friend, Please clarify your question. Thanks
Quiz Extreme
Quiz Extreme       Use Quiz Extreme quiz software to make your own quizzes on any subject, using a variety of question types. Create any kind of quiz you can imagine
iPhone Quiz App Tutorial
iPhone Quiz App Tutorial In this simple iPhone quiz application tutorial, we are going to learn how to create simple quiz in iphone. Creating a simple quiz in iPhone is really easy..Just follow the given steps to create the quiz
sir plz send the project on quiz system code
sir plz send the project on quiz system code  sir plz send the client server based project in core java database in my sql
Java Programming: Chapter 2 Quiz
Quiz Questions For Chapter 2 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 2 of this on-line Java textbook. You should be able... the quiz questions can be found here. Question 1: Briefly explain what
Java Programming: Chapter 7 Quiz
Quiz Questions For Chapter 7 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 7 of this on-line Java textbook. You should be able... the quiz questions can be found here. Question 1: What
Java Programming: Chapter 9 Quiz
Quiz Questions For Chapter 9 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 9 of this on-line Java textbook. You should be able... the quiz questions can be found here. Question 1: What does it mean
Java Programming, Chapter 12 Quiz
Quiz Questions For Chapter 12 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 12 of this on-line Java textbook. You should... the quiz questions can be found here. Question 1: What is meant
Java Programming: Chapter 1 Quiz
Quiz Questions For Chapter 1 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 1 of this on-line Java textbook. You should be able... the quiz questions can be found here. Question 1: One of the components
Java Programming: Chapter 4 Quiz
Quiz Questions For Chapter 4 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 4 of this on-line Java textbook. You should be able... the quiz questions can be found here. Question 1: A "black box"
Java Programming: Chapter 6 Quiz
Quiz Questions For Chapter 6 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 6 of this on-line Java textbook. You should be able... the quiz questions can be found here. Question 1: Programs written
Java Programming: Chapter 10 Quiz
Quiz Questions For Chapter 10 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 10 of this on-line Java textbook. You should... the quiz questions can be found here. Question 1: In Java, input
Java Programming: Chapter 3 Quiz
Quiz Questions For Chapter 3 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 3 of this on-line Java textbook. You should be able... the quiz questions can be found here. Question 1: Explain briefly what
Java Programming: Chapter 5 Quiz
Quiz Questions For Chapter 5 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 5 of this on-line Java textbook. You should be able... the quiz questions can be found here. Question 1: Object-oriented
Java Programming, Chapter 11 Quiz
Quiz Questions For Chapter 11 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 11 of this on-line Java textbook. You should... the quiz questions can be found here. Question 1: Explain what
Online Test System Project
://www.roseindia.net/jsp/online-quiz-application-jsp.shtml...Online Test System Project  I want a full ready-made project on online test system in jsp. i am not using servlet but only jsp.And backend database
Java Programming: Chapter 8 Quiz
Quiz Questions For Chapter 8 THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 8 of this on-line Java textbook. You should be able... the quiz questions can be found here. Question 1: What does the computer
quiz asked by my lecturer for array reverse....
quiz asked by my lecturer for array reverse....  consider a 2 dimensional array size m by n.Derive a function that can be used to reverse the elements of the array such that the last element of the array becomes the first
How to provide navigation in quiz application using jsp?
How to provide navigation in quiz application using jsp?  hi everyone. i am using jsp with mysql connectivity. i have to retrieve questions from db one at a time. on clicking the next it should go the next question
JavaScript
JavaScript  clone JavaScript
online test system
/online-quiz-application-jsp.shtml http://www.roseindia.net/answers/viewqa/JSP...online test system  Hi, I am creating a project for online test system.There should be a timer,on pressing next button it will retrieve a next
online examination
: http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml...online examination  coding for multiple choice question in jsp   We are providing you a simple application. Create table test
javascript
javascript  javascript code to dynamically add table on button click.../javascript/javascriptexamples/javascript-add-row-dynamically.shtml http://www.roseindia.net/javascript/javascript-add-row-to-table.shtml http://www.roseindia.net
quiz asked by my lecturer for array reverse....
quiz asked by my lecturer for array reverse....  consider a 2 dimensional array size m by n.Derive a function that can be used to reverse the elements of the array such that the last element of the array becomes the first
online voting
online voting  can i have the code for online voting in java
online voting
online voting  can i have the code for online voting in java
online bookbank
online bookbank  Need online book bank with mvc architecture
Javascript
Javascript  How validations are done using javascript ,with example? and interview questions on javASCRIPT
JavaScript
should use JavaScript? Thanks   Hi, JavaScript is scripting language that runs on browser. You have to embed JavaScript in HTML page. Please see JavaScript tutorial. Thanks
JavaScript
JavaScript  how to get full path of a file type in javascript
javascript
javascript  Hi deepak, how to write form validation on javascript
javascript
javascript  write a program to display implement about browsers using javascript
javaScript
javaScript  How to open a browser window that cannot be resized? (HTML + Javascript
javascript
javascript  i have just learned javascript... can you tell me what kind of applications can be made by javascript?? thank you
online shopping
online shopping  hi, i am doing online shopping project i want to do online payment. How it can be possible
Advertisements
 

 

 

DMCA.com