Forum /
Sencha Touch 2.x Forums /
Sencha Touch 2.x: Q&A /
Unanswered: Edit html of list item Template on list Item tap
Unanswered: Edit html of list item Template on list Item tap
Hello, i m using a list with following template -
<input type="checkbox" name="selectedCar" value={name}/> {name}
and I want to check the checkbox when the list item is tapped, but I m unable to achieve it, i tried with following code -
onListItemTap: function(dataview, index, target, record, e, options) {
target.select("input").set("checked","checked");
}
can somebody explain what I m doing wrong here...
Sencha - Community Support Team
Does target.select("input") actually result in a single input element?
If so, have you tried el.checked = true?
got it Working
got it Working
yes, you are right, the select is returning an array of elements, I got it working with -
target.select("input",e.target).set({checked:"checked"});
now, as I defined the root element, I only get one element with select and is checked successfully.
Last edited by Prakash23; 26 Sep 2012 at 4:56 AM .
Reason: typo
One more question...
One more question...
err, i m stuck again :S
i m able to mark checkbox, but the issue is that this list is shown of a navigation view, so when user presses back , and if he comes back to this screen(list) again , then the item tap event is not firing, any idea why this is happening?
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us