0

I have developed display template and using it in Content search web part.

For displaying result on page i am using JQuery datatable/JQuery Tabs in display template.

Everything works fine, but sometime while loading page i am getting error like ("Object doesn't support property or method 'dataTable' (OnPostRender: )" and for tabs error is "Object doesn't support property or method 'tabs' (OnPostRender: )").

And if i refresh page many times then error will go and result is display as code.

I have register JQuery, JS and CSS using $includeScript.

I have also tried with RegisterSod for JQuery and JS file but still issue is same.

Thanks in Advance.

Sayuri Mizuguchi
  • 5,250
  • 3
  • 26
  • 53
Milan Jain
  • 21
  • 3

1 Answers1

0

Can be: This error usually occurs when an html element id has the same id as some variable in the javascript function, try change the name.

If you put the code I'll be able to help you better.

test = button.attr('test'); // Object doesnt support this method

$test= button.attr('test'); // works fine

Or debbug your code with and discover your problem. Enable script debugging IE:

  • In Internet Explorer, choose Internet Options from the Tools menu.
  • In the Internet Options dialog box, click the Advanced tab.
  • On the Advanced tab, under Browsing, clear Disable Script Debugging.
  • Click OK.

If you have IE 8+ click here

Tutorial Using jQuery dataTables: link here

Sayuri Mizuguchi
  • 5,250
  • 3
  • 26
  • 53