Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need to use jQuery to toggle this jqGrid checkbox

Posted on 2011-09-20
6
Medium Priority
?
1,260 Views
Last Modified: 2012-05-12
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
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 36571613
what is the checkbox id or the class?
Is there a reference to checkbox object in the code above?
0
 

Author Comment

by:newbieweb
ID: 36572060
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
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 2000 total points
ID: 36572172
check this one

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

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:newbieweb
ID: 36572208
Great. But where do I fit in the initial code in this post? I get confused by the return value, etc.
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 36572228
i have only modified the code given in your previous comment
0
 

Author Closing Comment

by:newbieweb
ID: 36572748
Thanks for the help!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

662 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question