Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ajax call with dataTable lib
23rd September, 03:42
Post: #1
ajax call with dataTable lib
Hi There.Great Plugin and i love it
here is my problem:
i am calling an ajax call from the onRender function

JS Code
// Retrieve the content when tooltip is first rendered
         onRender: function()
         {   
            var self = this;
            var data = {
                action: 'getData',
		};
 
 
	jQuery.post('process.php', data, function(response) {
 
                 jQuery('#authorpublicchapters').dataTable();
                 self.updateContent(response);
 
            });
 
 
         }

the Server Response (getData method) return a table like this:

JS Code
<table id="authorpublicchapters">
<thead>
<tr>
<th>?? ????</th><th>?? ??????</th><th>?????</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
....
</tbody></table>


So, the content is get rendered but without the dataTable lib applied on the "authorpublicchapters" element.

It looks like that the two lines :
JS Code
jQuery('#authorpublicchapters').dataTable();
                 self.updateContent(response);

are used in correctly
i tryed to switch the order but no change.
i though of calling the
JS Code
Query('#authorpublicchapters').dataTable();

from a different method such as onContentUpdate
but i didnt saw any sample of using it

Is there a way to do it ?
thanks
Hana
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Position of qTip Modal from call within a tooltip chuuke 1 259 17th January 21:54
Last Post: Craig
  [Solved] How to call javascript function within Qtip? When2Meets2 7 1,099 19th September 16:49
Last Post: Craig
  Ajax call not being made from qtip sz3y1w 1 882 7th September 19:55
Last Post: Craig
  Auto width with Ajax Call sisilone 1 1,526 2nd September 12:34
Last Post: Craig
  [Solved] call qtip from a qtip netzton 4 806 28th August 21:20
Last Post: Craig
  Call other functions from within the tooltip hoopdloop 2 562 13th August 15:34
Last Post: hoopdloop
  [Solved] AJAX call: use different dataFilter than $.ajaxSetup? ItzMeJoey 3 2,175 6th July 17:53
Last Post: ItzMeJoey
  Add Title to Content with an Ajax Call brant 2 1,222 15th April 16:24
Last Post: Craig
  [Solved] using the updateStyle API call rmckillen 2 896 5th April 17:14
Last Post: rmckillen
  Call javascript function within Qtip? Meista 1 2,301 1st April 14:06
Last Post: sveiki



User(s) browsing this thread: 1 Guest(s)