Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Javascript in extension

Hi,

I am trying to create an extension using the ffg code:

Qva.AddExtension('CVL', function() {

   // Set the HTML

   var html = "<h1>Hello World</h1><script src=\"http://widgets.macroaxis.com/widgets/url.jsp?t=2\"></script>";

   this.Element.innerHTML = html;

},true);

The "Hello World" shows but the javascript never gets exected even if I keep it by itself it does not work:

Qva.AddExtension('CVL', function() {

   // Set the HTML

   var html = "<script src=\"http://widgets.macroaxis.com/widgets/url.jsp?t=2\"></script>";

   this.Element.innerHTML = html;

},true);

Kind Regards

Razak

2 Replies
ErikWetterberg

You cannot use innerHTML to add script tags. You might use Qva.LoadScript to load a script.

Erik

Anonymous
Not applicable
Author

Hi,

Could you please help me with this, I am new to this, my end objective is to try and create 3D surface charts.

I have attached 2 files:

widget.js

script.js

Could you please take a look at it,

Regards

Razak