Solved

Need to use jQuery to toggle this jqGrid checkbox

Posted on 2011-09-20
6
1,238 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:gurvinder372
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:
gurvinder372 earned 500 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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:gurvinder372
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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 …
Suggested Courses

622 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