[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

08/20/2009 at 03:13PM PDT, ID: 24669825
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

onclick help to hide row and related row in table using Jquery

Asked by Pdesignz in Jquery, JavaScript, Asynchronous Javascript and XML (AJAX)

Tags: Jquery, Javascript, Ajax

Hello,

I need help with a jquery function...

I have table (view png for example) and there are rows and related rows that relate to an original row, so row 1 with data and row 1a, with status of of void. There is also a checkbox above the table that when clicked will hide the row and related row that have action of void. So essentially hide any row that has action status of void and the related row or corresponding row. The related row should normally be above the voided row, but may not always be right on top of each other, as sorting will be ascending related rows will always be above rows with void status.

I am new to javascript and jquery, so any code or examples you can provide, would be much appreciated. If I could double the points awarded I would...


here is something that a friend gave me that might help get started.

When the "Hide voided items" box is checked,  we not only hide the rows that contain Action = Void, but also the related row that was voided. In the example below, each yellow voided row is related to red row directly above it.

NOTE:   Related rows will not always be located DIRECTLY above the Void row, but they will ALWAYS be ABOVE the Void row because the table is always sorted by Date ascending.  Void can only be related to something that's already occurred.

You need to write a script using JQuery where its useful to streamline code, and/or with standard Javscript.  What's important is to make the script with a few as lines as possible.  Unless you can come up with a better alternative, and I encourage you to consider all possibilities, I think your script should be based on the following logic:

hideVoid(){

get the Activity Log table

go to last row and begin traversing the rows in reverse order

looking for a row where column #2 innerHTML = "Void"

if true,  remember the row num
      continue traversing up the table looking for the row that relates to our Void row
      
      if the next row is not a Void row, see if it's a related row      

      to match a related row, see if column 1, column 3, column 4, AND column 5 innerHTML = same innerHTML from our Void row (all must match)

      hide the related row and the Void row


continue traversing up the table looking for any more Void rows
      if we find another Void, repeat the process to find related row
]


Thank you, much appreciated for your help!!
Attachments:
 
Demo Chart of what is needed
Demo Chart of what is needed
 
[+][-]08/21/09 03:26 PM, ID: 25156422

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/21/09 07:42 PM, ID: 25157212

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/21/09 07:57 PM, ID: 25157229

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Jquery, JavaScript, Asynchronous Javascript and XML (AJAX)
Tags: Jquery, Javascript, Ajax
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08/24/09 10:28 AM, ID: 25170432

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/24/09 11:40 AM, ID: 25171104

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_3_20080625