Atozed Forums
External JS with template - Printable Version

+- Atozed Forums (
+-- Forum: Atozed Software Products (
+--- Forum: IntraWeb (
+---- Forum: English (
+----- Forum: IntraWeb General Discussion (
+----- Thread: External JS with template (/thread-2366.html)

External JS with template - matija - 04-13-2021

My application using HTML bootstrap templates with datatables.

I will insert whis javascript:

To much source for execute with WebApplication.CallBackResponse.AddJavaScriptToExecute!

Is there a change implement with external .js file?

RE: External JS with template - Alexandre Machado - 04-15-2021

You can just copy the whole JS content to a file, name it whatever you want (E.g. "CustomDataTable.js") and save it inside application's wwwroot folder.

Then you add it to the IWForm's ContentFiles at design time or at run time, with no path (because it is relative to wwwroot folder):

procedure TIWForm1.IWAppFormCreate(Sender: TObject);

If you want to see other uses of DataTables with IntraWeb I suggest you try this example as well:

(it shows some other features that you may not need, but focus on the DataTables usage)