jeudi 12 février 2015

check box and radio button does not work in sharepoint page



i added both the check box and radio button to my page but when i try check the radio button or check box does not respond: but it does work properly in a simple html page, by the way the these components are added to a jQuery Dialog:


code : for checkboxes:



<fieldset title="Language Source">


<legend>Langue Source</legend>
<label><input type="radio" name="langueSource"
value="Anglais" id="Ang" />Anglais</label>
<label><input type="radio" name="langueSource"
value="Français" id="Fr"/>Français</label>
<label><input type="radio" name="langueSource"
value="Allemand" id="Al"/>Allemand</label>
<label><input type="radio" name="langueSource" value="Arabe"
id="Ar"/>Arabe</label>
</fieldset>


radio buttons are generated:



<fieldset id="field">
<legend>Langue Cible</legend>
<!-- Here I want my set of radio button -->
</fieldset>


$().SPServices({
operation: "GetListItems",
async: false,
listName: "Dictionnaire",
CAMLViewFields:"mycamlquery",
CAMLQuery: "myviewfields",
completefunc: function (xData, Status) {

$(xData.responseXML).SPFilterNode("z:row").each(function() {

var langue_source = $(this).attr("ows_Langue_x0020_entr_x00e9_e");

var langues_cible = $(this).attr("ows_Langues_x0020_sortie").replace(/#
/g,"").split(';');


for (var i=1; i<langues_cible.length-1; i++) {

$("<label id='" + langues_cible[i] + "_label'>")
.text(langues_cible[i])
.prependTo("#field");

$("<input type='checkbox' value='"+langues_cible[i]+"' />")
.attr("id", langues_cible[i])
.attr("name", "langueCible")
.attr("value", langues_cible[i])
//.attr("checked", "checked")
.prependTo("#" + langues_cible[i] + "_label");

}

})
}
});


enter image description here








0 commentaires:

Enregistrer un commentaire