Please help: dynamic radiobuttons
Hello,
I'm creating a dynamic content management system. I've a problem with the form where you can fill in the content. I use different controls on the page, also radio buttons.
I ask the value from the database and check the right one.
But when I check the other one (by editing a page) it doesn't work.
Some code... how the form is created.. (in front you don't know how many radiobuttons have to be created)
-
var brokenstring = item.values.split(",");
$.each(brokenstring, function(i, value){
html += '<input type="radio" name="column|' + item.column + '" value="' + value + '" ' + ((value == item.value) ? "checked=''" : "") + ' />' + value; //{if $bez == $item.storedvalue}CHECKED{/if}
});
First, it creates an array with the amount of the radiobuttons.
Second, the system creates the radiobuttons.
The HTML code:
-
<input type="radio" checked="" value="true" name="column|fade"/>
true
<input type="radio" value="false" name="column|fade"/>
false
Some code that retrieves all the data from the form.
-
$("form").find("input:checked, input:type='text', input:type='hidden', input:type='password', input:type='submit', option:selected, textarea").filter(":enabled").each(function(){
params[this.name || this.id ||
this.parentNode.name ||
this.parentNode.id] = this.value;
alert(this.value);
});
What I'm doing wrong?
Off-course I use the newest version of jQuery.
any one??
With kind regards,
Roy