Solved

jQuery, flexigrid

Posted on 2008-06-17
4
386 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

948 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now