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 7074479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:03:46+00:00 2026-05-28T06:03:46+00:00

pretty new to HTML and I was wondering why this snippet of code doesn’t

  • 0

pretty new to HTML and I was wondering why this snippet of code doesn’t work?

<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
    <div style="font-family: Consolas;">
        <h1>This is a survey regarding *</h1>
        <form name="firstQuestion" method="get" action="">
            <input type="radio" name="q1" value="1" id="num1">I think its 1<br>
            <input type="radio" name="q1" value="2" id="num2">I think its 2<br>
            <input type="radio" name="q1" value="3" id="num3">I think its 3<br>
            <input type="radio" name="q1" value="4" id="num4">I think its 4<br>
            <input style="position: absolute; bottom: 10px; right: 10px" type="button" value="proceed" onclick="alert('Checked value is: '+getCheckedValue(document.forms['firstQuestion'].elements['q1']))"> 
        </form>
    </div>
</body>

The problem is that when I press the proceed button nothing happens whereas it is supposed to return the selected radio button as you can see.

Also now I’m at it, does anyone know how to add for example an extra textfield between option 3 and 4 if possibility 3 is chosen?
by default and if not 3 is chosen the textfield shouldnt be visible.

  • 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-28T06:03:47+00:00Added an answer on May 28, 2026 at 6:03 am

    The button handler is calling a javascript function called getCheckedValue, but you haven’t defined this.

    === UPDATE ===

    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript">
            function getCheckedValue(oElements) {
                // TODO: put in the function body here
            }
        <script>
    </head>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am pretty new to php world. I wrote the following: <html> <head> <title>It
I'm pretty new to QML. According to the QML documentation at http://doc.qt.nokia.com/4.7-snapshot/qdeclarativescope.html , the
I'm pretty new to MVC, but I have the following code: <td> @Html.DisplayFor(modelItem =>
I'm pretty new to rails and haml.. and I can't get this to work
I'm pretty new to the idea of recursion and this is actually my first
Pretty new to all this, so if I am going about my puzzle in
I'm pretty new to wordpress, html, css, and javascript and would love your help
I'm pretty new to wordpress, html, css, and javascript and would love your help
I'm pretty new to cron jobs so this might be an easy answer but
I'm pretty new to Backbone so excuse me if this question is a little

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.