The web page has dynamically created rows and columns with checkboxes across the top and down the left side. The Qty input field is disabled so data cannot be entered until the dissecting "day" and "process" checkboxes are clicked.
Mon[] Tue[] Wed[] Thu[] (class="day")
Process 1[] Qty[ ] Qty[ ] Qty[ ] Qty[ ]
Process 2[] Qty[ ] Qty[ ] Qty[ ] Qty[ ]
Process 3[] Qty[ ] Qty[ ] Qty[ ] Qty[ ]
(class="process")
I have tried attaching on change events (not "onclick" because there are checkboxes to turn on all "day"s and all "process"s. which works) but am not getting even close to solving this problem. The error I get is
"SyntaxError: expected expression, got '.'"
if (this).is(":checked"){
the dynamic HTML is:
Functions:
function weekdayticked(){
$(".day").each(function(){
if (this).is(":checked"){
var thisid=this.id;
processticked(thisid)
}
})
}
function processticked(thisid){
/* loops thru all processes for this "day" */
alert(thisid);
}
What am I doing wrong? Please point me in the right direction and help me with the use of "this". Thank you.
NB I have CTRL+K the code but still get an error message.
Aucun commentaire:
Enregistrer un commentaire