Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have some problems to include JavaScript libraries in my QlikView Extension.
/*
*Start of my Script.js
/*
var extensionName = "MY_EXTENSION";
var extensionPath = Qva.Remote + "?public=only&name=Extensions/" + extensionName + "/";
function ExtensionStart() {
Qv.AddExtension(extensionName,
function() {
//logic code goes in here
/*
* ...
*/
}
}
function Init_JS_Frameworks() {
var files = [];
files.push(extensionPath + "Scripts/jquery-1.9.1.min.js");
files.push(extensionPath + "Scripts/jquery-ui-1.10.2.custom.min.js");
files.push(extensionPath + "Scripts/jQueryFileDownloadPluginv1.4.0.js");
Qv.LoadExtensionScripts(files, ExtensionStart);
}
Init_JS_Frameworks();
/*
*End of my Script.js
*/
Is this methodic right, or what error can I have made, the Path of the files are correct. Please give me some tips.
Thanks
Copy your definition.xml file to scripts folder
Kind Regards
Alexander Karlsson
18 jun 2013 kl. 08:36 skrev "steoelpr" <qcwebmaster@qlik.com<mailto:qcwebmaster@qlik.com>>:
QlikCommunity<http://community.qlik.com/index.jspa>
Re: include external JavaScript libraries in Extension
created by steoelpr<http://community.qlik.com/people/steoelpr> in Integration and Extensions - View the full discussion<http://community.qlik.com/message/358215#358215>
Make sure you are running QV11 since the LoadExtensionScripts method was added in that release.
Also it seems you are referencing a sub-folder in your extension called Scripts. Make sure you also have a definition.xml in there.
The definition.xml needs to present in every folder of your extension or atleast in the bottom node of your folder structure. The definition.xml file itself can be pretty empty, no need to define any dimensions or expression but it needs to be there.
Also if your jQuery plugin does not require 1.9 we ship 1.7.1 of jQuery and jQuery UI version 1.8.6.
Atleast you will save some performance on the scripts loading
Hello Aleaxander,
I am using QlikView 11 SR2, my project structure looks so:
MyExtension
+Script.js
+Definition.xml
+Properties.qvpp
+Scripts
+jquery-1.9.1.min.js
+jquery-ui-1.10.2.custom.min.js
+jQueryFileDownloadPluginv1.4.0.js
I think I make the correct instructions.
Copy your definition.xml file to scripts folder
Kind Regards
Alexander Karlsson
18 jun 2013 kl. 08:36 skrev "steoelpr" <qcwebmaster@qlik.com<mailto:qcwebmaster@qlik.com>>:
QlikCommunity<http://community.qlik.com/index.jspa>
Re: include external JavaScript libraries in Extension
created by steoelpr<http://community.qlik.com/people/steoelpr> in Integration and Extensions - View the full discussion<http://community.qlik.com/message/358215#358215>