• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1288
  • Last Modified:

Need to use jQuery to toggle this jqGrid checkbox

I have the following code which I need to understand, then be able to toggle the checbox to unchecked.  I don't understand how at the same time there can be a filter, a return value, hiding and adding attributes, and WAI-ARIA support to boot.

So when I need to make the checkbox unchecked, I am confused.
I have not yet read about the t3() function, so a little explanation of that may help.

$("span[t3parent=global_select]", $("#mydata tr.jqgrow").filter(function (index) {
return $("td[aria-describedby=mydata_PermitAccess][title=true]", this).length == 0;
}).hide().attr("directaccess", "no")).attr("t3parent", "root");

So I need to do all this AND toggle the checkbox to unchecked.

Any help or explanation would be appreciated.

Thanks!
0
newbieweb
Asked:
newbieweb
  • 3
  • 3
1 Solution
 
Gurvinder Pal SinghCommented:
what is the checkbox id or the class?
Is there a reference to checkbox object in the code above?
0
 
newbiewebSr. Software EngineerAuthor Commented:
No. I do not think so in that code above. But I started to write the following after drilling down with Firebug and was told I was "getting close" after writing the following:

$("td a.checkbox[aria-describedby=mydata_PermitAccess][title=true]").attr("checkbox", "unchecked");

I think my problem was here: attr("checkbox", "unchecked");

I wasn't sure of the syntax for the attr() function and think I do indeed need to find how to reference the class there. Not sure how...
0
 
Gurvinder Pal SinghCommented:
check this one

$("td a.checkbox[aria-describedby=mydata_PermitAccess][title=true]").each(function(){
  if($(this).is(":checked"))
  {
     $(this).removeAttr("checked");
  }
});

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
newbiewebSr. Software EngineerAuthor Commented:
Great. But where do I fit in the initial code in this post? I get confused by the return value, etc.
0
 
Gurvinder Pal SinghCommented:
i have only modified the code given in your previous comment
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks for the help!
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now