Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

radio button checked="checked" not working fine

  • 2 Antworten
  • 3 haben dieses Problem
  • 4 Aufrufe
  • Letzte Antwort von cor-el

more options

i have two radio buttons

<input type="radio" name="scraplocation" id="radio1" value="port" checked="checked" onclick="showport();"> Port
                       	<input type="radio" name="scraplocation" id="radio2" value="door" onclick="showdoor();">Door

Here the first button will be in selected condition but when i want to select the second button it not working fine. i want to click twice or thrice to choose second radio button.
The problem vanishes if i choose i avoid checked="checked" in first radio button

i have two radio buttons <pre><nowiki><input type="radio" name="scraplocation" id="radio1" value="port" checked="checked" onclick="showport();"> Port <input type="radio" name="scraplocation" id="radio2" value="door" onclick="showdoor();">Door</nowiki></pre> Here the first button will be in selected condition but when i want to select the second button it not working fine. i want to click twice or thrice to choose second radio button.<br /> The problem vanishes if i choose i avoid checked="checked" in first radio button

Geändert am von cor-el

Alle Antworten (2)

more options

Hi there,

This support website is primarily intended for Firefox end users, not web developer questions. Upon first glance, it's hard to tell what might be going on with your code. Could there be something happening in the showdoor() function that triggers it to reset? You might want to try to strip out those onClick functions and see if it works then -- if it does, you'll want to closely debug the functions.

more options

A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.