Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Incorporating JavaScript libraries
Fri, May 3 2024 8:07 PMPermanent Link

erickengelke

Avatar

I recently needed to use an external JavaScript library.  Here's why and how I did it.

https://erickengelke.com/posts/post26.html

There are more blog posts at:

https://erickengelke.com/posts/

Erick


----
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Sat, May 4 2024 12:54 AMPermanent Link

erickengelke

Avatar

erickengelke wrote:

I've updated
https://erickengelke.com/posts/post26.html
to point to a sample application demonstrating the tool.

Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Mon, May 6 2024 12:52 PMPermanent Link

Ralf Mimoun

Thanks!
Mon, May 6 2024 1:09 PMPermanent Link

Ralf Mimoun

Is it possible to load the Asciidoc.js via AddLocalJavaScript instead of using TScript? Would make my sourcecode way easier to read Smile
Mon, May 6 2024 3:23 PMPermanent Link

erickengelke

Avatar

Ralf Mimoun wrote:

>Is it possible to load the Asciidoc.js via AddLocalJavaScript instead of using TScript? Would make my sourcecode way easier to read Smile

You can load JS from EWB code.  Just do something like this in the OnShow for your form.

var
Form1 //.... defintiion
private
 asciidocjs : Script
end;


...
  asciidocjs := TScript.Create( self );
  asciidocjs.OnLoad :=  somefuncitonsayingitsloaded;
  asciidocjs.URL := 'asciidoc.js';
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Tue, May 7 2024 2:40 AMPermanent Link

Ralf Mimoun

I know SmileBut there is a handy AddLocalJavaScript method in your library, and I wondered if it can be used in this case.
Tue, May 7 2024 6:25 PMPermanent Link

erickengelke

Avatar

Ralf Mimoun wrote:

> I know SmileBut there is a handy AddLocalJavaScript method in your library, and I wondered if it can be used in this case.

Sure, that would work.  

Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Image