Atozed Forums
Datatables question - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Datatables question (/thread-6323.html)



Datatables question - Vitrescent - 07-27-2026

Hello.  I have rawtext (IWLabel.Caption) for my json data.  

Code:
'{ "data": [ .... ] }'


I want this rawtext include in define of datatables (HTML template).

Code:
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA('$(''#examples'').DataTable( {  "ajax": ' + rawtext + ',} );'); 


How?


RE: Datatables question - Alexandre Machado - 07-28-2026

Any valid JavaScript should execute using this method. (or WebApplication.ExecuteJS() which will do basically the same, but with a much shorter syntax).

Did you try it that way? Did it work? If not what are the errors showing in the browser console?


RE: Datatables question - Alexandre Machado - 07-28-2026

If you have a faulty demo that I can build and run, please feel free to send the *source code* to alexandre at atozed dot com