newbie27
asked on
jquery plugin
Hello Experts,
I am using the code below to post the jEditable column data via Ajax request. At present it is posting data for all the jEditable columns available in the Flexigrid. However I wanted to post only those who who are selected. Perhaps I can use if Flexigrid Tr Selected then post that column value?
Please can someone advice/help in this?
Your help is much appreciated.
Thanks
Sam
I am using the code below to post the jEditable column data via Ajax request. At present it is posting data for all the jEditable columns available in the Flexigrid. However I wanted to post only those who who are selected. Perhaps I can use if Flexigrid Tr Selected then post that column value?
Please can someone advice/help in this?
Your help is much appreciated.
Thanks
Sam
var param="";
$(".edit_area").each( function(){param+= "," + escape(this.innerHTML) });
param = "tempNotes=" + param.substring(1);
ASKER
hello xorlev,
thanks for your comment, yes please have the complete code attached...
please advice
thanks
sam
thanks for your comment, yes please have the complete code attached...
please advice
thanks
sam
$(document).ready(function(){
var sRefNos = "";
var myList = showShortList();
for(var x=0; x<myList.length; x++){
sRefNos += "," + myList[x].id ;
}
sRefNos = sRefNos.substr(1);
var sQuery = "SF1=keyword&ST1="+sRefNos;
repopulateList();
$("#listDisplay").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 : removeFromList},
{separator: true}
],
sortname: '',
sortorder: 'asc',
usepager: false,
title: 'List Manager',
useRp: true,
rp: 1000,
query : sQuery+'&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"
}
);
}
});
});
This function write the XML data needed for the Flexigrid
Function WriteResultsTable(xTxt, FieldList)
Dim results, r, parts, p, blob, header, footer, total
total = XMLField(xTxt,"documentcount",false)
results = Split(XMLField(xTxt, "resultfields", false), chr(28))
parts = Split(FieldList, ",")
blob="<page>"&page&"</page><total>"&total&"</total>"
For each r in results
blob = blob & vbCrLf & "<row id='" & XMLField(r, "id", False) & "'>"
for each p in parts
blob = blob & "<cell><![CDATA[ "
if p="ref_no" then
blob = blob & "<input type='checkbox' name='chk_"& XMLField(r, "fv_" & p, False) &"' id='chk_"& XMLField(r, "fv_" & p, False) &"' value='"& XMLField(r, "fv_" & p, False) & "' class='chkRefNos' title='"&trim(XMLField(r, "fv_pe_rev_name", False))&"'/>"
elseif p="notes" then
blob = blob & "<div class='edit_area' style='display: inline'>notes</div>"
else
blob = blob & XMLField(r, "fv_" & p, False)
end if
blob = blob & " ]]></cell>"
next
blob = blob & "</row>" & vbCrLf
Next
WriteResultsTable = "<?xml version='1.0' encoding='utf-8'?><rows>" & blob & "</rows>"
End Function
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello Xorlev,
Thanks for looking this out for me, I just have tried your suggested change but It did not work ...
I even tried adding a condition, if the check box for the row where jEditable column has been selected then submit that value otherwise for all the rows, but still no luck yet..!
i am hoping you will get a broader picture of what i am trying to do here if you please visit this
http://213.253.134.6/artism/admin/rdbm_results3.asp?SF1=keyword&ST1=media&SORT=pe_sort_name
on the page, please click on each icon of the row to get added to the shortlist in the left nav or an icon in the header to add all...
once yu have added few items to the list, please click on save to actually see where i am trying to work out with this problem.... list_admin.asp
for authorisation please use test/test as user details ....
there you can see either you wanted to add one or all records to the list, all the jeditable row value been posted ....
thanks for your time and help
Thanks for looking this out for me, I just have tried your suggested change but It did not work ...
I even tried adding a condition, if the check box for the row where jEditable column has been selected then submit that value otherwise for all the rows, but still no luck yet..!
i am hoping you will get a broader picture of what i am trying to do here if you please visit this
http://213.253.134.6/artism/admin/rdbm_results3.asp?SF1=keyword&ST1=media&SORT=pe_sort_name
on the page, please click on each icon of the row to get added to the shortlist in the left nav or an icon in the header to add all...
once yu have added few items to the list, please click on save to actually see where i am trying to work out with this problem.... list_admin.asp
for authorisation please use test/test as user details ....
there you can see either you wanted to add one or all records to the list, all the jeditable row value been posted ....
thanks for your time and help
ASKER
Xorlev,
I have another open question I wonder If you can also please have a look at it. Thanks Sam
https://www.experts-exchange.com/questions/23480131/flexigrid-script-slight-modifications.html
I have another open question I wonder If you can also please have a look at it. Thanks Sam
https://www.experts-exchange.com/questions/23480131/flexigrid-script-slight-modifications.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
It may be as easy as checking if the element has the selected class.