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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:35:10+00:00 2026-06-09T18:35:10+00:00

Being new to javascript, I’m way in over my head. But I’m trying :P

  • 0

Being new to javascript, I’m way in over my head. But I’m trying 😛

Basically what I need to do is redirect to a url based on the options selected in the form below. There will be 4 checks in total.

  • If Windows & Advanced are selected, redirect to A
  • If Windows and Basic are selected, redirect to B
  • If Mac and Basic are selected, redirect to C
  • If Linux and Basic are selected, redirect to D

However, I’m not quite sure how I would be able to grab the specific names of each radio button and select option, let alone see if they are checked, and make the checks listed above.

If someone could point me in the right direction, it would be much appreciated. Thanks.

     <form action="process_form.php" class="TTWForm" method="post" novalidate="">
        <div id="field3-container" class="field f_100">
          <label for="field3">Your Operating System</label>
          <select name="field3" id="field3" required="required">
            <option id="field3-1" value="Windows"> Windows </option>
            <option id="field3-2" value="Mac"> Mac </option>
            <option id="field3-3" value="Linux"> Linux </option>
          </select>
        </div>
        <div id="field2-container" class="field f_100 checkbox-group required">
          <label for="field2-1">Version</label>
          <div class="option clearfix">
            <input type="radio" name="field2[]" id="field2-1" value="Basic">
            <span class="option-title"> Basic </span> <br>
          </div>
          <div class="option clearfix" id="optional">
            <input type="radio" name="field2[]" id="field2-2" value="Advanced">
            <span class="option-title"> Advanced </span> <br>
          </div>
        </div>
      </form>
  • 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-06-09T18:35:11+00:00Added an answer on June 9, 2026 at 6:35 pm

    I would add a button, and do something on the submit of the form :

    $(".TTWForm").on('submit', function(e) {
        e.preventDefault();
        var field2 = $("#field2-1").is(':checked') ? 'Basic' : $("#field2-2").is(':checked') ? 'Advanced' : null,
            field3 = $("#field3").val();
    
        if (!field2) {
            alert('Select a version!');
            return;
        }
    
        var url = 'http://mysite.com/' + field2 + '/' + field3 + '/';
        document.location.href = url;
    });​
    

    FIDDLE

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

Sidebar

Related Questions

I've been programming for a few years but I'm new to JavaScript. I'm trying
I figured this would be simple, but being new to SSRS I'm not sure.
Being new to JQuery and trying to understand all the posts about different ways
I'm not new to JavaScript, but I've never really had too much in-depth knowledge
I am a bit new to javascript and was trying to understand how the
I'm currently trying to learn Knockout.JS - I'm also relatively new to JavaScript itself.
Have been following this fabulous tutorial . Being new to Javascript and functional programming,
Being quite new at JavaScript, I'm assuming the answer to my question is extremely
Fought with a bunch of examples and, being still new to jQuery/Javascript, cannot get
a function can return null , but is there any way for the new

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.