javascript - checkboxes behave like radiobuttons with different names -


I have a problem, which can be easy for you Im new in jQuery and selectboxes, check boxes and 3 radiobuttons (3 Trying to do a form (calculator) with the same name, just one or any other can be checkable).

When I submit a form (at least for the first time), the value of each input remains the same as I wanted but when I submit it without refresh / reset the second time, check the radiobutton disappears first In which, and even when I reclick a radiobutton without refreshing and submit it, the value can not be maintained by php.

So I decided to change the radio button to the checkbox, and this is where I need your help.

I need 3 checkboxes, which can be selected "Anyone" with only one or a different name.

  & lt; Input type = "checkbox" id = "checkbox8" value = "1" name = "8" to & lt ;? Php if (isset ($ _ post ['8']) & amp; amp; $ _POST ['8'] == '1') echo 'check' = "check" '; & Gt; / & Gt; & Lt; Input type = "checkbox" id = "checkbox9" value = "2" name = "9" & lt ;? Php if (isset ($ _ post ['9']) & amp; $ _POST ['9'] == '2') echo 'check' = "check" '; & Gt; / & Gt; & Lt; Input type = "checkbox" id = "checkbox10" value = "3" name = "10" & lt ;? Php if (isset ($ _ post ['10 ']) & amp; $ _POST [' 10 '] ==' 3 ') echo' check '= "check"'; & Gt; / & Gt;  

I have prepared it:

[ONE LINK] ()

Thank you very much !! Hope you can help me

Try this: -

  var $ Unique = $ ('# Checkbox 8, # Checkbox 9, # Checkbox 10'); $ Exclusive.Click (function () {$ unique.not (this) .removeAttr ('checked');});  


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -