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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:26:57+00:00 2026-05-24T01:26:57+00:00

I have the following coded radio buttons, which retrieve value(s) in the code below.

  • 0

I have the following coded radio buttons, which retrieve value(s) in the code below.
Is it possible to create hyperlink references from these retrieved values e.g., google.com and/or yahoo.com for the selected radio buttons?

<script language="javascript">
<!--

function RadioCheck() {


var selection = document.quiz.colour;

for (i=0; i<selection.length; i++)

  if (selection[i].checked == true)
 alert(selection[i].value);




}

//-->
</script>



</head>
<body>

<form name="quiz">

  <input type="radio" name="colour" value="red">red<br>
  <input type="radio" name="colour" value="orange">orange<br>
  <input type="radio" name="colour" value="yellow">yellow<br>
 <br>


<input type="submit" value="Check Answer" onClick="RadioCheck()">

</form>

thanks in advance.

  • 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-24T01:26:57+00:00Added an answer on May 24, 2026 at 1:26 am

    I’m not sure if ‘red’ should redirect to Google, but in case you’d like this, code along the lines of:

    <input type="radio" name="colour" value="http://google.com/">red<br>
    

    and then in JavaScript:

    if (selection[i].checked == true)
    location.href = selection[i].value;
    

    So instead of alerting the value, you navigate to the value, which has been set to some website.

    You would also need to cancel the real submitting: http://jsfiddle.net/HDL7J/.

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

Sidebar

Related Questions

I have the following code in jQuery for a set of radio buttons which
Suppose I have the following code which creates two radio buttons: <li id=foli517 class=
I have the following jQuery code to make my checkboxes act like radio buttons,
For example I have the following radio buttons: <input type=radio name=hand id='hand_left' checked value=L>
I have following Code Block Which I tried to optimize in the Optimized section
I have the following HTML: <div class=row1> <input type=radio name=group1 value=0 checked=checked/>Zero <input type=radio
I have the following code that controls radio button options shown one level at
I have the following code (which is created dynamically by Magento) and I need
I have a group box which has some radio buttons. I am trying to
I have the following code which toggles the visibility of one of a pair

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.