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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:14:01+00:00 2026-06-14T08:14:01+00:00

So I am having trouble with this disable stuff. I am trying to toddle

  • 0

So I am having trouble with this disable stuff. I am trying to toddle a disable with an IF statement and radio buttons. I have tried with out an if with no success. Please help if you can! My code is as follows.

<html>
<h1>Convert Temperature</h1>
<body>
<input id="example" type="radio" onClick="toggle('example', 'disableMe')" name="Radio" value="Radio"> 
From Fahrenheit to Celsius </br>
<input id="example" type="radio" onClick="toggle('example', 'disableMe')" name="Radio" value="Radio"> From Celsius to Fahrenheit
</br>
</br>
</br>
<form name="converter">
Celsius: <input id="disableMe" type="text" name="celsius" onChange="CelsiusConverter()"><br />
Fahrenheit: <input id="disableMe" type="text" name="fahrenheit" onChange="FahrenheitConverter()"><br />
<input type="button" value="Convert!" />
</form>
</body>
<script language="JavaScript">
<!--
function CelsiusConverter(){
document.converter.fahrenheit.value = (document.converter.celsius.value * 9 / 5) + 32
}
function FahrenheitConverter(){
document.converter.celsius.value = (document.converter.fahrenheit.value - 32) * 5 / 9
}
//-->
function toggle(radioID, toggleID) { 
var radio = document.getElementById(radioID); 
var toggle = document.getElementById(toggleID); 
updateToggle = radio.checked ? toggle.disabled=true : toggle.disabled=false;

if (radioID = checked)
{
toggle.disable=true;
}
}
</script>
</html>

I know that the IF i have in there doesn’t look right and something need to be fix but i don’t know how!

  • 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-14T08:14:02+00:00Added an answer on June 14, 2026 at 8:14 am
    • To be picky you should prefer === to == for comparison.
    • You should also aim for id’s to be unique in your page.
    • change <script language="javscript" to <script type="text/javascript"
    • What do you expect the value of checked to be in your comparison?
    • jQuery would help you here
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble figuring this out. If I have a checkboxlist inside a usercontrol,
I have been having trouble with my program trying to gray out ( and
I am having trouble with this expression: preg_match('#<file(.*)source-language=(.){2}(.*)>#Ui', $xliff, $matches); I am trying to
Having some trouble figuring this one out. If both the checkbox in the second
I'm having much trouble figuring this out, so maybe someone can help me. This
I'll try this again. I'm having trouble figuring out how to work with the
This is the XML I'm trying to parse. I'm having trouble parsing the entry
Having trouble framing this assertion in Rspec for my rails app. A User has
Im having trouble understanding this : why Microsoft put Xattribute under Xobject ? they
I am having trouble moving this JLabel across this JPanel? I put the code

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.