Jump to content

radio button "checked" does not work in Firefox


Recommended Posts

Hello,

 

I am trying to do some coding here but found out that radio button of html form "checked" does not work in Firefox , the button remains uncheck, but it works fine in IE, anyone has the problem before and have the solution to share??

 

Or any other way to write "checked" for radio button which works in Fire fox??

 

I am using firefox 3.6

 

Thanks!

 

Example:

<input type="radio" name="number" value="1" checked="checked"> 1        <--- does not work in firefox (no check)

 

<input type="radio" name="number" value="1" checked> 1        <--- does not work in firefox (no check)

  • 2 months later...
  • 11 months later...

I just encountered this problem also, but found a cause and solution.

 

I was using radio buttons and other input elements on a page where the data was being posted via Ajax, and I did not need a form. However, the lack of a form tag caused this Firefox (4) problem i.e. checked='checked' was ignored on radio button inputs. Chrome was OK. I didn't check other browsers.

 

Adding a form tag to the page fixed the issue with Firefox. As inputs are supposed to be form elements, the behaviour is understandable.

 

Perhaps this was also the cause of the original poster's problem.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.