Search
18435 results 2921-2930
Forum
- 16th Sep 2014__flash__addCallback error with IE9 and AjaxHi everyone, In a particular situation, I have an error with the __flash__addCallback function with IE9. In retracing, I realized part of the problem. In my page, I have a form and when I submit it, I include an HTML table and then instantiates datatable tabletools. Everything goes well until I try to print the page. To reproduce the bug, I have to follow these steps: - Generate a table by submitting the form - Print (ctrl + p) - Generate a new table by submitting the form - Print (ctrl + p) An error stack appears in the console: SCRIPT5007: Unable to set value of the property 'setHandCursor': object is null or undefined SCRIPT5007: Unable to set value of the property 'cleartext': object is null or undefined SCRIPT5007: Unable to set value of the property 'setText': object is null or undefined SCRIPT5007: Unable to set value of the property 'appendText': object is null or undefined SCRIPT5007: Unable to set value of the property 'setFilename': object is null or undefined SCRIPT5007: Unable to set value of the property 'setAction': object is null or undefined SCRIPT5007: Unable to set value of the property 'setCharset': object is null or undefined SCRIPT5007: Unable to set value of the property 'setBomInc': object is null or undefined I realized every time I hacve reinstantiate tabletools, the id of the flash object is incremented (in my case: (ZeroClipboard_TableToolsMovie_1 then ZeroClipboard_TableToolsMovie_2 etc ...). In trying to debug, I realized that __flash__addCallback function attempts to pass back loop all ZeroClipboard_TableToolsMovie id (...) even if they have already been destroyed. I tried several solutions such as running a destroy() on the instance datatable. Would anyone ever had this problem? Thank you for your help DEBUG CODE : http://debug.datatables.net/axuviz
- 8th Aug 2014How to edit previously loaded data (with AJAX) in a DataTableCurrently I'm fetching data from a REST web service with this call that outputs my jsonData, that will be used like this. var t = $('#newAttributes').DataTable({ data: jsonData, columns: [ { data: 'jsonId' }, { data: 'jsonName' }, { data: 'jsonRef' } ], stateSave: true }); Just like here: http://datatables.net/manual/data#Objects I tried it out, and it works perfectly but I cannot change the fields' content. Then, after, I tried filling the input fields "manually", so this was the code I got: var t = $('#newAttributes').DataTable({ stateSave: true }); $('#show_button').on('click', function (args) { for(var i=0;i<args.length;i++){ var obj = args[i]; t.row.add([ '<input type="text" name="id" value="'+ obj['jsonId'] +'"/>', '<input type="text" name="name" value="'+ obj['jsonName'] +'"/>', '<input type="text" name="ref" value="'+ obj['jsonRef'] +'"/>' ]).draw(); ++t.attrId; } }); $('#show_button').click($jsonData); // show_button is hidden This solution was based on other solution I built following this: http://datatables.net/examples/api/form.html And also... it's not working. Does anyone got this issue and solved it? Thank you in advance.
- 6th Aug 2014posting JSON via AJAX results in garbled request payloadI'm attempting to post JSON data to the server and use the JSON in the response to ultimately populate the datatable. However I've experiencing some strange behavior. Using this code: table_config.ajax = { "type": "POST", "url": $(location).attr('pathname'), "data": JSON.stringify({'member_id':2444}), "dataType": "json", "contentType": "application/json", "dataSrc": "results.data" }; I get a 400 HTTP response and the request payload looks like: 0=%7B&1=%22&2=m&3=e&4=m&5=b&6=e&7=r&8=_&9=i&10=d&11=%22&12=%3A&13=2&14=4&15=4&16=4&17=%7D What's going on here?
- 25th Jun 2014Reload table data with Ajax responseI have a datatable which I destroy using ---- table.destroy(), then I reinitialize the entire datatable giving parameter ---- ajax:"new data source", but getting datables.net/tn/7 error. Also tried the following $('#datagrid').dataTable().fnClearTable(); var table = $('#datagrid').DataTable(); table.fnReloadAjax(response); datatable is getting cleared, but not getting reloaded. what am I doing wrong...?
- 25th Jun 2014Ajax object source with dynamic keys and dots.Hi, I build the columns option dynamically in a loop var columnsObj; for (i=0; i<columnsToDisplay.length; i+=1) { columnObj = { "data": columnsToDisplay[i], //CAN HAVE DOTS e.g. "column.a.b" "title": columnsToDisplay[i] }; } Unfortunately these column names often have dots. Datatables by design thinks these are nested objects and gives an unknown parameter requested error. How can I turn of that behaviour or bypass it? I tried this thread but passing my variable into the column does not work. Any suggestions? Thanks
- 21st Jun 2014How to retrieve the data from sqlserver database using DATATABLES through ajax service callsCode in VB.net
- 20th Jun 2014How do I change column titles based on the data received from AjaxI am including a reload button in my DataTable that does table.ajax.reload(). I want to change the column name once I receive this data. I have an integer column in the title of which I always want to indicate the sum of all values in that column. For example if the column title was Foo and the values loaded were [3,4,5] then I would like my column title to become Foo [12]. How can I do this?
- 19th Jun 2014Lost formatting after updating table headers from ajax requestHere's the scenario: I load up a form with some generic headers. I'd prefer to load no headers and just hide the datatable for now. The client fills out the form and based on what checkbox they select a different results set AND results header is returned. I don't know what the headers will be until after they submit the form. Once they submit i use a $("#resultsHeader").replaceWith() to update the header columns of the datatable. Now I lose all my datatable styles and nothing seems to work. I have tried fnDestroy() and fnUpdate and nothing seems to work. you can see all my code at: http://jsfiddle.net/j7mQd/
- 14th Jun 2014How to access each row value in datatable when using ajaxMyDatatable Row1val1 | Row1val2 | Row1val3 | Row1Total Row2val1 | Row2val2 | Row2val3 | Row2Total Row3val1 | Row3val2 | Row3val3 | Row3Total Row4val1 | Row4val2 | Row4val3 | Row4Total .... | SUM(RowTotals) I want rowtatal using Ajax...how to get it???
- 19th May 2014Get ajax to load when json source doesn't have a data wrapperHi, I have DataTables set up correctly and working with a hard-coded JSON source. However, in my real-life application I have to use a JSON feed which I can't control. This JSON feed has the following format: [ { "adminNotificationTypeId" : 11, "customerId" : 0, "dateTime" : "2014-05-15T20:16:00Z", "dateTimeClosed" : "0001-01-01T00:00:00" }, { "adminNotificationTypeId" : 7, "customerId" : 0, "dateTime" : "2014-05-06T11:31:00Z", "dateTimeClosed" : "0001-01-01T00:00:00" }, { "adminNotificationTypeId" : 7, "customerId" : 0, "dateTime" : "2014-05-06T11:31:00Z", "dateTimeClosed" : "0001-01-01T00:00:00" } ] DataTable doesn't seem to like this as it's missing the wrapping 'data' JSON object. I wondered if there's a way to get DataTables to consume this feed? Many thanks folks.