hi people
re: : viewtopic.php?p=8932#p8932
I get that this should work but I’m not quite understanding it, this is the code I am using to select items from ‘list1’
phoneui.prePageTransition = function(currentPageId,targetPageId) {
if (currentPageId == ‘#m1-tv_order’) {
summarize();
}
return true;
}
phoneui.documentReadyHandler = function() {
}
function summarize() {
var summary = “”;
//multiple select list: get selected items as array
$(‘select[name=”list1″] :selected’).each(
function(i, selected) {
summary += $(selected).text()/* + “;” + $(selected).val()*/ + “\n”;
});
$(‘#m1-summary-textArea1’).text(summary);
}
This all works great but I think I need to provide a button on the summary page clearing the selections in the textArea and all the ticks in the selectlistitem boxes.
Then where do I put the code? Do I attach it to the button under ‘run javascript’ or does it go in the _custom.js file.
Can you help with this please?
Regards