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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:23:12+00:00 2026-05-21T14:23:12+00:00

Im fighting with this all day, searching on google and on stackoverflow but cant

  • 0

Im fighting with this all day, searching on google and on stackoverflow but cant get it why is this working:

<head>

    <script src="/js/jquery.js" type="text/javascript"></script>

       <script type="text/javascript">
       $('input:radio[name="RADIOSELECTOR"]').change(function() {

            if ($(this).val()=='one') {
                    $('#ones').removeAttr('disabled');
                 $('#twos').attr('disabled',true);
            } else if ($(this).val()=='two') {
                $('#ones').attr('disabled',true);
                 $('#twos').removeAttr('disabled');
            }  else  {
              $('#ones').attr('disabled',true);
                      $('#twos').attr('disabled',true);
             }


                         });

       </script>
    </head>
    <form name="order" action="managecart.html" onsubmit="return AddToCart(this); return ValidateCart(this);">
    <input name="PRICE" type=hidden id="PRICE" value="" />
    <input name=NAME type=hidden id="NAME" value="" />
    <input name=ID_NUM type=hidden id="ID_NUM" value="" />
    <input type=hidden name="SHIPPING" value="0.00" />
    <input type="radio" name="RADIOSELECTOR" value="lose" onClick="document.order.PRICE.value='59.99'; document.order.NAME.value='iPhone 3G Glass/digitiazer replacement'; document.order.ID_NUM.value='3GGL'; document.order.SHIPPING.value='0.00';" />Glass/digitizer repair  <b>59.99$</b><br><br>
    <b> Combo repairs:</b><BR><br>
    <input type="radio" name="RADIOSELECTOR" value="lose" onClick="document.order.PRICE.value='74.99'; document.order.NAME.value='iPhone 3G Glass/digitizer + battery repair'; document.order.ID_NUM.value='3GGLB'; document.order.SHIPPING.value='0.00';" />Glass/digitizer + battery repair = <b> 74.99$</b> 25$ in savings!<br>

    <input type="radio" name="RADIOSELECTOR" value="one" onClick="document.order.PRICE.value='79.99'; document.order.NAME.value='iPhone 3G Glass/digitizer + combo '; document.order.ID_NUM.value='3GGLC'; document.order.SHIPPING.value='0.00';" />Glass/digitizer + <select id="ones" name="ADDITIONALINFO2" disabled="disabled">
    <option value=" "></option><option value="Home button">Home button</option> <option value="Power button">Power button</option><option value="Mute switch">Mute switch</option><option value="volume button">Volume button</option></select>

     = <b>79.99$</b> 30$ in savings!<br>

    <input type="radio" name="RADIOSELECTOR" value="two" onClick="document.order.PRICE.value='99.99'; document.order.NAME.value='iPhone 3G Glass/digitizer + combo + ''ADDITIONALINFO3'; document.order.ID_NUM.value='3GGLBC'; document.order.SHIPPING.value='0.00';" />Glass/digitizer + battery +  <select name="ADDITIONALINFO3" id="twos" disabled="disabled><option value=" "></option><option value="Home button">Home button</option> <option value="Power button">Power button</option><option value="Mute switch">Mute switch</option><option value="volume button">Volume button</option></select> = <b>99.99$</b> 30$ in savings!<br>

    <input name="QUANTITY" type="hidden" value="1" /><br>
    <input type="image" src="./images/addtocart.png" align="center" name="BUY" value=" Add to cart " ALT="Add to Cart">
    </form>

this works on jsFiddle but not on my website or JSbin, witch gives error:

$ is not defined Caused by line
(28/26):
$(‘input:radio[name=”RADIOSELECTOR”]’).change(function()
{

Also is there a way that when “select” gets disabled it automatically goes to first option? Thank you 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-21T14:23:13+00:00Added an answer on May 21, 2026 at 2:23 pm

    You’re doing your bindings before the dom is loaded. You need to wrap your script in

    $(document).ready(function() {
    });
    

    or the shorthand version of the same thing

    $(function() { 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been fighting this all day. Inside my styles.xml file I have color information
I've been fighting with this problem all day and am just about at my
Sorry if this is obvious or covered elsewhere, but i've been googling all day
I have been fighting all day in understanding Dijkstra's algorithm and implementing with no
I have fighting to get a IN parameter to work inside of a LIKE
I've spent a good portion of my day fighting with GridView.Sort(). Nothing I did
I have not been working in SQL too long, but I thought I understood
I have been fighting this problem with the help of a RegEx cheat sheet,
I have been fighting this issue for some time so today I started a
I would like to move all Javascript from HTML markup into separate files but

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.