lundi 28 septembre 2015

Jquery and checkboxes, i can't see the changes

I have many checkboxes in a ASP item repeater :

<asp:Repeater ID="rpPostes" runat="server" DataSource="<%# this.ItemsPostesBudgetaires %>">

Somewhere within the repeater, a checkBox described as :

<asp:CheckBox runat="server" Class="chk" ID="chkPieceJust" Text="Recues" Visible="<%#  Mode.HasFlag(ModeType._BoutonsApprobation)  %>" Enabled="<%# CheckBoxDispo() %>" Checked="<%# CheckBoxChecked(Container.DataItem as Transaction) %>" />

At the end of all that, a button that is suppose to turn every checkBoxes to true :

<input id="chkAllPieceJust" type="button" value="Toutes Pièces Justificatives Recues" onclick="CTCC.Transactions.PieceRecuClick(this);" />

And finaly here's my Jqeury function :

CTCC.Transactions.PieceRecuClick = function (source) {

$('.chk').attr('checked', true);

}

What happens after i click the button is that kind of html output :

<span class="chk" checked="checked"><input ... blablabla

but nothing happens, checkboxes are not checked at all...

I can't figure what else do i need...




Aucun commentaire:

Enregistrer un commentaire