javascript - Radio button not checked when again loading form with ajax -
I have an element that I use to enhance value in the database.
& lt; P id = "valuta" & gt; & Lt; Label = "valuta" & gt; Valuta: & lt; / Label & gt; & Lt; Br / & gt; & Lt; Select id = "valuta2" name = "valuta2" & gt; & Lt; Option value = "USD" & gt; US & lt; / Options & gt; & Lt; Option value = "EUR" & gt; EUR & lt; / Options & gt; & Lt; Option value = "rsd" & gt; RSD & lt; / Options & gt; & Lt; / Select & gt; & Lt; / Br & gt; Konvertuj cenu? & Lt; / Br & gt; & Lt; Input type = "radio" id = 'conversion' class = 'conversion' name = "conversion" checked = "check" value = "1" & gt; DA & lt; Br> & Lt; Input type = "radio" class = "conversion" name = "conversion" value = "2" & gt; Northeast & lt; / P & gt; & Lt; / Br & gt;
But when I try to load this element, my radio button is not checked. I am working with AJAX.
After the AJAX operation in the part of the success, I try:
$ ('#information'). Prop ('checked'); . $ ('# Conversion') attr ('check'); $ ('#conversions') Etter ('check', 'check')
No results? .prop ('checked', ...)
can be either true
or false
, so the correct code is:
$ ('#information'). Prop ('checked', true);
Comments
Post a Comment