1 Reply Latest reply: Aug 2, 2015 9:30 AM by Tushar Suvarna RSS

    Extension problem

      Hi

       

      Please can you help me with the problem which has been answered before

      http://community.qlik.com/message/208571#208571

       

      I am facing a problem with qv extension . I would like to dynamically display content in the HTML format by reading a text file stored in my PC. I'm using JavaScript (with JQuery) for scripting behavior.

       

      I get every time is the error message

       

      below is the script.js file code.

      Please can you help.

       

       

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

       

         Qva.LoadScript(Qva.Remote + "?public=only&name=Extensions\HelloWorld\jquery.js" , function() {

               if(!jQuery)

                               alert("Essential plugin (jquery) not loaded"); // work!

                  else

                               alert("Essential plugin (jquery)  loaded"); // work!

       

          });

       

        Qva.LoadScript(Qva.Remote + "?public=only&name=Extensions\HelloWorld\jquery-migrate.js" , function() {

              if(!jQuery)

                               alert("Essential plugin (jquery migrate) not loaded");

             else

                               alert("Essential plugin (jquery migrate)  loaded"); // work!

       

          });

       

        var html = "";

        html += "<H1 style='text-align: center;'>";

        html += "<p>Before</p>";

        $(document).ready(function() {

        alert("in"); 

        $.ajax({

                type: "get",

                url : Qva.Remote + "?public=only&name=Extensions\HelloWorld\Test.txt",

                dataType: "text",

                async :   false,

                success: function(data, textStatus, jqXHR){

                  html += "<p>"+data+"</p>";

                },

                error: function(XMLHttpRequest,textStatus, errorThrown){

                  alert("error : " + textStatus + "\n" + errorThrown);

                }

            });

       

          html += "<p>After</p>";

       

          this.Element.innerHTML = html;

      });

       

      },true);