Solved

jQuery, flexigrid

Posted on 2008-06-17
4
405 Views
Last Modified: 2012-06-22
Hello Expert,

Just a quick question on the way I am handing the Flexigrid data, I just have a thought to make the default flexigrid as a dynamic one, then we don't need two different IDs.

whether its a cookie list or list name from the <SELECT> we show in the same flexigrid, is this not possible?

as we are doing now for all the <SELECT> listnames...

<div id="defaultResults"><table id="listDisplay" style="display:none"></table></div>                        
<span id="dynamicResults"><table id="listDisplay1" style="display:none"></table></span>      

Please advice
Thanks
Sam
0
Comment
Question by:newbie27
  • 3
4 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 21805834
>> same flexigrid, is this not possible?
Of course. I don't know why you chose two different <table>. I thought you had some "plan" for it. To be able to "repopulate" the same <table> you would need to wrap it in some container element like a div:
<div id="flexicontainer"><table id="listDisplay></table></div>

 and whenever you want to populate it, before you attempt to make the flexigrid ajax call you would need to obliterate the contents of flexigridcontainer as follows:
$("#flexicontainer").html('<table id="listDisplay" style='display:none;'></table>');
0
 
LVL 8

Author Closing Comment

by:newbie27
ID: 31468080
thanks
0
 
LVL 8

Author Comment

by:newbie27
ID: 21805979
Then I wont need

function checkAll(id )
{
      $( id +" > tbody > tr > td > div > input.chkRefNos").each(function(){
                this.checked = id;
            });
}

and

   ( listID=="#listDisplay") ? {display: '<input type="checkbox" name="chkAll" onclick="checkAll(&#39;#listDisplay&#39;)"/> All', width : 30} : {display: '<input type="checkbox" name="chkAll" onclick="checkAll(&#39;#listDisplay1&#39;)"/> All', width : 30},
                        

??

please advice
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23492649.html

i have moved all the function to the list.js file Hielo
0
 
LVL 8

Author Comment

by:newbie27
ID: 21807877
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

830 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