newbie27
asked on
jQuery flexigrid
Hello Experts,
I have 2 different results and I want to display in one <table id=""></table>, at present I am using following two tables for showing the result.
<table id="listDisplay" style="display:none"></tab le>
<table id="listDisplay1" style="display:none"></tab le>
I have tried using "listDisplay" for both results but its seems that it is only working for the first ajax response ...
listViewer("#listDisplay" , sQuery);
listViewer("#listDisplay", sViewQuery );
please advice
thanks
s
I have 2 different results and I want to display in one <table id=""></table>, at present I am using following two tables for showing the result.
<table id="listDisplay" style="display:none"></tab
<table id="listDisplay1" style="display:none"></tab
I have tried using "listDisplay" for both results but its seems that it is only working for the first ajax response ...
listViewer("#listDisplay" , sQuery);
listViewer("#listDisplay",
please advice
thanks
s
function listViewer(listID, param1)
{
$(listID).flexigrid
({
url: 'list_proxy.asp?a=results',
colModel : [
{display: ' ', name : 'chkDelete', width : 30, sortable : false, align: 'left'},
//{display: '<input type="checkbox" name="chkAll" onclick="checkAll(this.checked)"/> All', width : 30},
{display: 'Notes', name : 'notes', width : 50, sortable : false, align: 'left'},
{display: 'Contact ', name : 'pe_rev_name', width : 150, sortable : true, align: 'left'},
{display: 'Compnay Name ', name : 'co_name', width : 200, sortable : true, align: 'left'},
{display: 'Flag ', name : 'action_flag', width : 150, sortable : true, align: 'left'},
{display: 'Group ', name : 'co_group', width : 200, sortable : true, align: 'left'}
],
buttons : [
{name: 'Delete', bclass: 'delete', onpress : test},
// {name: 'Select All', bclass: 'add', onpress : test},
//{name: 'DeSelect All', bclass: 'delete', onpress : test}
],
sortname: '',
sortorder: 'asc',
usepager: false,
title: 'List Manager - Titles',
useRp: true,
rp: 1000,
query : param1 +'&Fields=ref_no,notes,pe_rev_name,co_name,action_flag,co_group',
showTableToggleBtn: true,
width: 760,
height: 350,
onSuccess:function()
{
$(".edit_area").editable(
function(value, settings) { return(value); },
{
submit : "OK",
indicator : "process..........",
tooltip : "Click to edit...",
style : "inherit",
callback : function (value, settings){if ($(this).hasClass('trSelected')){alert('selected');} }
}
);
}
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
just a thought hielo, can we not use one <table class="listDisplay"></tabl e> and use it for different results set?
i mean is this necessary to define 2 separate ids here?
<table id="listDisplay" style="display:none"></tab le>
<table id="listDisplay1" style="display:none"></tab le>
i mean is this necessary to define 2 separate ids here?
<table id="listDisplay" style="display:none"></tab
<table id="listDisplay1" style="display:none"></tab
>>can we not use one <table class="listDisplay"></tabl e>
ids MUST be unique, not classes. So if you use a class, you could potentially get a reference to multiple elements (<tables> in this case), and you will still need to figure out a way to differentiate between the tables. Using the id is the way to go.
ids MUST be unique, not classes. So if you use a class, you could potentially get a reference to multiple elements (<tables> in this case), and you will still need to figure out a way to differentiate between the tables. Using the id is the way to go.
ASKER