Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1037879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:54:15+00:00 2026-05-16T14:54:15+00:00

I did a quiz page for our computer project and I’ve recently finished it.I

  • 0

I did a quiz page for our computer project and I’ve recently finished it.I was happy to know that it was working well. The problem now is that it only works on Google Chrome but not on Firefox. When I open it in Google Chrome, everything works: prompts for a name, function for score, etc. But nothing works in Firefox. Need help please.

<html>
    <head>
    <title>Javascript Quiz</title>
    <script type="text/javascript">
    function name()
    {
        var n
        n = prompt("Enter your name")
        document.q.name.value = n
    }
    function score()
    {
        var a
        var s = 0;
        var m

        if (q.answer1.value=="Alex Alfred S. Billones")
        {
            s = s+1
        }
        if (q.answer2.value=="grandfathers")
        {
            s = s+1
        }
        if (q.answer3.value=="b")
        {
            s = s+1
        }
        if (q.answer4.value=="c")
        {
            s = s+1
        }
        if (q.answer5.value=="b")
        {
            s = s+1
        }
        if (q.answer6.value=="Angel" || q.answer6.value=="Rex" || q.answer6.value=="Alejandro")
        {
            s = s+1
        }
        if (q.choicesSet2a.checked==true && q.choicesSet2c.checked==true && q.choicesSet2e.checked==true && q.choicesSet2b.checked==false && q.choicesSet2d.checked==false)
        {
            s = s+1
        }
        if (q.answer8.value=="17")
        {
            s = s+1
        }
        if (q.answer9.value=="a")
        {
            s = s+1
        }
        if (q.answer10.value=="never")
        {
            s = s+1
        }

        // remarks part
        if (s==0)
        {
            m = "You don't know me =("
        }
        if (s>0&&s<=3)
        {
            m = "You probably heard stories about me from someone."
        }
        if (s>=4&&s<=5)
        {
            m = "You've met me."
        }
        if (s>=6&&s<=8)
        {
            m = "You know me well."
        }
        if (s==9)
        {
            m = "You love me! :D"
        }
        if (s==10)
        {
            m = "You're a stalker."
        }
        //end of remarks part

        a = confirm("Are you sure with your answers?")
        if (a==true)
        {
            true
        }
        else
        {
            break
        }
        document.q.final.value = s;
        document.q.remark.value = m;



    }
    </script>
</head>

<body bgcolor="green" text="white" onload="name()">
<center><b>How well do you know me? Take this quiz to find out!</b><br>
            Observe correct capitalization of letters in typing.</center><hr>
<form name="q">
<ol>
    <li>What is my COMPLETE name? (with correct middle initial)<br>
        Answer: <input type="text" name="answer1" value=""/>
    </li>

    <li>
        From who among the following was my name gotten from?<br>
        <select name="answer2">
            <option value=""></option>
            <option value="grandfathers">Grandfathers</option>
            <option value="uncle">Uncle</option>
            <option value="stranger">Stranger</option>
            <option value="famous">Famous person</option>
        </select>
    </li>
    <li>Which of the following is the correct spelling of my family name?<br>
        <input type="radio" name="choicesSet1" onclick="q.answer3.value='a' ">Billiones<br>
        <input type="radio" name="choicesSet1" onclick="q.answer3.value='b'">Billones<br>
        <input type="radio" name="choicesSet1" onclick="q.answer3.value='c' ">Biliones<br>
        <input type="radio" name="choicesSet1" onclick="q.answer3.value='d' ">None of the above.<br>
        <input type="hidden" name="answer3" value=""/>
    </li>

    <li>When is my birthday?<br>
        <input type="radio" name="choicesSet2" onclick="q.answer4.value='a' ">February 14<br>
        <input type="radio" name="choicesSet2" onclick="q.answer4.value='b'">October 17<br>
        <input type="radio" name="choicesSet2" onclick="q.answer4.value='c' ">December 17<br>
        <input type="radio" name="choicesSet2" onclick="q.answer4.value='d' ">March 28<br>
        <input type="hidden" name="answer4" value=""/>
    </li>

    <li>How many siblings do I have?<br>
        <input type="radio" name="choicesSet3" onclick="q.answer5.value='a' ">3<br>
        <input type="radio" name="choicesSet3" onclick="q.answer5.value='b' ">2<br>
        <input type="radio" name="choicesSet3" onclick="q.answer5.value='c' ">1<br>
        <input type="radio" name="choicesSet3" onclick="q.answer5.value='d' ">100<br>
        <input type="hidden" name="answer5" value=""/>
    </li>

    <li>Name one of my siblings. (nickname/first name only) <br>
        Answer: <input type="text" name="answer6" value=""><br>
    </li>

    <li>Which of the following are my hobbies? (only three of them are correct)<br>
        <input type="checkbox" name="choicesSet2a">Playing soccer<br>
        <input type="checkbox" name="choicesSet2b">Studying<br>
        <input type="checkbox" name="choicesSet2c">Surfing the net<br>
        <input type="checkbox" name="choicesSet2d">Drinking<br>
        <input type="checkbox" name="choicesSet2e">Reading<br>
    </li>

    <li>What is my favorite number?<br>
        <select name="answer8">
            <option value=""></option>
            <script type="text/javascript">
                for (c=1;c<=50;c++)
                {
                    document.write("<option value='")
                    document.write(c,"'>",c,"</option>")
                }
            </script>
        </select>
    </li>

    <li>How did I have my front tooth broken?<br>
        <input type="radio" name="choicesSet4" onclick="q.answer9.value='a' ">I fainted.<br>
        <input type="radio" name="choicesSet4" onclick="q.answer9.value='b'">I got punched in the face.<br>
        <input type="radio" name="choicesSet4" onclick="q.answer9.value='c' ">I tripped and fell down.<br>
        <input type="radio" name="choicesSet4" onclick="q.answer9.value='d' ">None of the above.<br>
        <input type="hidden" name="answer9" value=""/>
    </li>

    <li>How many times have I been in a relationship?<br>
        <select name="answer10">
            <option value=""></option>
            <option value="1">1</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="never">Never</option>
        </select>
    </li>

</ol>

    <center>
    <input type="button" value="Well...how did I do?" onclick="score()">
    <input type="reset" value="Reset"/><br><br>
    Thank you for taking the quiz, <input type="text" name="name" size="5">.You scored <input type="text" name="final" id="final" size="1"> out of 10.<br>
    <input type="text" name="remark" size="50">

    </center>
</form>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:54:16+00:00Added an answer on May 16, 2026 at 2:54 pm

    My Firefox Web Developer Toolbar tells me the following when running this code:

    • Error: unlabeled break must be inside loop or switch
    • Error: name is not a function

    The first is to be fixed by replacing break with return. The second has disappeared after fixing the first.

    Firebug also tells about the same problems in the JS console.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Did anybody know more information about this attack ? I recently got this script
Did anyone try that feature and has some feedback? Or Does anyone know some
Did you know that : Map<Object,Object> m1 = new HashMap<Object, Object>(); Map<Object,Object> m2 =
we did this problem today in math class to kill time after a quiz,
Did actually someone make already a tutorial that shows how to customize an UITableView?
Did any one have luck recently register Visual studio 2008 express C# product? Look
Did anyone face a problem of putting buttons (or any other widgets) on the
did someone else encounter this problem? I use the methods PopUpManager.createPopUp() and PopUpManager.centerPopUp() to
Did a dumpdata of my project, then in my new test I added it
Did you use teamviewer? (comic question i know... Who doesn't use it?) Do you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.