Quiz - How To Highlight The Correct Answer
Jul 6, 2011
//I can't figure out how to highlight the correct answer, I wrote a highlight function but it doesn't seem to work.
var useranswers = new Array();
var answered = 0;
function renderQuiz() {
[code]....
View 1 Replies
ADVERTISEMENT
Sep 6, 2011
I am making a simple multiple choice quiz and if user gets all correct i need it to automatically go to a new page rather than having a manual button for that so they cant move on until all questons are answered correctly.
View 13 Replies
View Related
Jul 28, 2011
I need to have three text boxes, user will enter a number in each box.Then i have four buttons, add, subtract, divide and multiply.When i click on each button, the numbers in the first two text boxes should match the answer in the third text box.ex. (first box has a 4, second box has a 4, and the third box has an 8. if i click the add button, i should get a "correct" answer in the div below with a green background and if i hit the multiply button the div should say "wrong" with a red background.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>[code].....
View 3 Replies
View Related
Dec 29, 2009
I wrote a simple code in javascript and it is working fine with IE and Firefox but the out put in php array count is correct in IE but not correct in Firefox
<script language="javascript">
var arrdimensions = {
"codimesion":{"s":{'0':'dimesion1','1':'dimesion2','2':'dimesion3','3':'dimesion4','4':'dimesion5','5':'dimesion6','6':'dimesion7'},"c":1,"m":"50", "sc":1, "f":"nopcs[]"}
};
function adddimensions(what) {
[Code]...
View 1 Replies
View Related
Jun 5, 2011
Got this below code for a page im working on, what you'll notice is that when you hover over 'order' a sub menu appears,
How do I make the 'order' remain highlight while Im hovering over the sub menus.
View 2 Replies
View Related
Dec 26, 2011
[URL]..Default.aspx I have both a carousel with images andalso animagemap(notnot published yet)with coords that when clicked i want to write to a cookie file which image or image map coordinate was clicked, so when they are hyperlinked to the next page the correct div opens based on first reading the cookie written to on the previous page. Anybody have a basic script for reading and writing to a cookie using jquery in this fashion?
View 2 Replies
View Related
Jul 7, 2010
Ive made the quiz works fine but instead of a box which displays the percentage I would like to have a pop up box when they click the submit button, also inside the pop up box it displays i.e. you got 4 out of 10 for example.
<HEAD>
<script language="JavaScript">
var numQues = 10;
[code].....
View 1 Replies
View Related
Oct 3, 2010
I wrote quiz using HTML and JavaScrip. Score is accumulated in a variable called myScore. Now I want to email the result of myScore to an email address. How do I go about doing this? I don't want to use the mailto: command since that require that user actually press the send command to send the email. I want this done automatically after user finishes the quiz.
View 4 Replies
View Related
Aug 6, 2009
I was tasked with creating a JavaScript quiz...I succeeded in doing so but part of the requirement was to use hidden fields for the answers.
Would this be possible using the code I currently have:
View 8 Replies
View Related
Sep 9, 2011
The page will display brief instructions followed by a table containing the quiz.The first is with the Score() function which reads as follows:
function Score(){
for(i=1;i<=10;i++)
if(ans[i]== yourAns[i])
[code]....
Now unless I'm mistaken (which I am since the score isn't being tabulated correctly) this function essentially uses a for to cycle through both arrays, comparing the user's input against the array containing the right answers. If the contents within index i are the same on both arrays the score increases by one point. Once it cycles through the arrays, it passes score over to prequiz.score.value which will later pass this number to the text box that will display the grade to the user.
Thinking it was the setAnsArray(question, answer) function I added a document.writeline to it. However it showed that the values were being passed correctly to the answer array. Added a document.writeline to the Score() function. Unlike the point above, score always displays as 00000 regardless of how many right answers I provide.
The second issue I'm having is that the reset button is not working correctly. If I hit reset and answer the first question, the score will come back as double the score displayed before.
<?xml version="1.0" encoding= "utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
[code]....
View 10 Replies
View Related
Mar 22, 2009
I'm trying to make a Quiz that generates random pictures each time the page is launched , with multiple options for the user to choose the right answer satsifying the picture and its meaning .
I've made the pseducode and i understand the algorithm ..but i don't know how to write the statements .
My algorithm is :
1-Random picture is shown each time the page is launched.
2- 6 Buttons are placed .
3-user choses the right matching answer.
4- window is popped up saying "correct"when its correct if not , an alert saying ;'Your answer is incorrect. Please try again"
So this is the code i've made , i know there's errors but just to show the Idea.
View 4 Replies
View Related
Nov 8, 2010
I am trying to add a dropdown list with the point values 1, 2, 3 ,4.If I use the number 1 from the dropdown for the first question, I need it to not allow the user to use that value again for questions 2, 3, and 4.
View 1 Replies
View Related
Nov 4, 2010
I want to make a simple quiz in HTML using JavaScript. I have made a web page called scoreboard which contains two tables. I have attached the screen shot of how the web page looks as well as the coding here with this msg. below is the description of my web page. If you find it lengthy or not understandable, pls refer my attached image of the web page.
Description: one table contains two rows - one for direct answers and another for answers which are given during their pass chance in the quiz. There are four buttons - Team A, Team B, Team C and Team D for both the direct and pass. And the second table contains four text boxes which which displays the score for each Team.
Now, in my web page i have typed the required coding so that when in click the TeamA, TeamB,...buttons in the direct row, the score board for Team A adds up 10 points.
Now i want to add 5 points for the respective teams when i click their team button in the pass row. I am not able to code that. the code goes below.
<html>
View 6 Replies
View Related
Nov 13, 2009
My assignment is to create an online quiz with a random image generator. I have created my online quiz using 5 linking files and everything works great. My only problem is getting the images to show up on my quiz. All I get is the filename with a red X. Which the files do show up at random when I refresh, so I know that part is working. I just don't know what I am missing to get the actual picture to show up. Please keep in mind this isn't the whole code as I have different linking files for this assignment.
<?xml version = "1.0" encoding = "utf-8"?>
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN" "[URL]">
<!-- Assignment CH10 Solution -->
<html xmlns = "[URL]">
<head>
<title>Online Quiz</title>
<script type = "text/Javascript">
<!--
var rimg = 0;
var pictures = [ "logo", "logo2", "logo3", "logo1", "cover" ];
function randpics(){
var myQuiz = document.getElementById( "myQuiz" );
rimg = Math.floor( Math.random() * 5 );
myQuiz.logo.src = pictures[rimg]+'.gif';
myQuiz.logo.alt = rimg + ' : ' +pictures[rimg];
} function checkAnswers() {
var myQuiz = document.getElementById( "myQuiz" );
if ( myQuiz.elements [ 0 ].checked )
alert ( "Congratulations, your answer is correct" );
else if the answer is incorrect
alert ( "Your answer is incorrect. Please try again" );
} end function checkAnswers
-->
View 6 Replies
View Related
Jun 17, 2008
I want to run a quiz competion on my website in which after logging any user play that quiz, like I will give 50 question to solve in just 3 min time, all will be objective question, now after that 3 min, quiz will automatically end and all users marked answer entered to the database, means he has not press any submit button, but after specific time all answer automatically enter in the database, and he come out from it..
Now I am using this timer:
<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN" "[URL]">
<html><head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head><body>
<?php
$dateFormat = "d F Y -- g:i a";
$targetDate = time() + (1*60);Change the 25 to however many minutes you want to countdown
$actualDate = time(); .....
Where to bring changes or which new thing is to be added.
View 7 Replies
View Related
Sep 14, 2011
It's a simple quiz with one multiple choice question and one fill in the blank.
When the user clicks on 'submit' I tried to show some kind of response with correct/incorrect images next to the question. It works with the multiple choice question, but not with the fill in the blank. How can I get the fill in the blank question to work.
Code:
answer_list = [
['False'],
['body','hips','knees']
[Code].....
View 2 Replies
View Related
Nov 1, 2011
I need to alert the answer 31 but keep getting 34. It has to go like this ticket*reward+cost. It would be 24+4+3=31. I would need to times the tickets by rewards then add the cost after. How would I alert this? code...
View 3 Replies
View Related
May 12, 2011
I am looking for a javascript quiz script that will allow me to grade individual sections of a quiz rather than grading the quiz as a whole.
I am looking to setup an online test consisting of a number of sections but the output must grade each section individually.
View 3 Replies
View Related
May 13, 2009
I have a multiple choice quiz in HTML. My requirement for scoring this quiz seems to be different from every other quiz I have seen on the net.
This is due mainly, I believe, to the fact that the number of questions involved in this quiz can be from 1 to infinite as the user action brings up the next question from external JS Q&A files.
In addition I want the user to see their score amended each time they answer a question, not at the end of the quiz (which theoretically may never happen).
In the existing code I already determine and provide "Correct" and "Incorrect" messages immediately following the selection of any of the four 'answer' radio buttons.
What I need to do now is to find out how I can arrange to:
1 count all the Correct answers - when they occur and add to a 'running' total (RT1)
2 count all the Incorrect answers - when they occur and add to a 'running' total (RT2)
3 calculate:- (RT1/(RT1 + RT2)) x (100/1) = percentage success rate so far.
The percentage success rate so far� is to be shown in a text field for the user to see.
View 7 Replies
View Related
May 26, 2009
when I click the check box the answer appears. When i click of it, it does not disappear....
<IMG src="/ukassets/images/75/CM%20new%20template/index_r2_c1.jpg" border=0>
<style type="text/css">
#container {
[code]...
View 3 Replies
View Related
Mar 25, 2011
I am obviously new to Javascript, etc me by pointing out what is wrong with my code while changing as little as possible ... and if you could also please explain the part that says code...
as I copied that portion from someone and I really don't understand it. code...
View 7 Replies
View Related
Aug 13, 2010
what is the function of code...
View 2 Replies
View Related
Dec 9, 2010
I have created a checkDelete function to ask the user if he wants to delete the selected entries from a database. The problem is that choosing cancel still deletes those entries.
This is the function code...
View 9 Replies
View Related
Aug 13, 2009
m just a beginner in java scripting.I just made the following code for calculating the factorial of a number [code] however when i try to run it the result is not displayed in the field.
View 2 Replies
View Related
Apr 18, 2011
My client wants a simple quiz with the correct answers displayed if they get them wrong. I used code from somewhere on this site, but this is the first time I have ever wrote javascript. My problem is: When the scored answers are displayed in the new window, there are no spaces. How do I format the script to display text with breaks between each answer?
[Code]...
View 13 Replies
View Related
Mar 28, 2009
Radio button to text answer
View 2 Replies
View Related