1 Reply Latest reply: Sep 17, 2012 5:56 PM by Jeffrey Goldberg RSS

    Help: load document extension in workbench asp.net page

      Hello,

       

      I'm trying to load a document extension into a workbench aspx page.  I've tried countless ways to make this work but my javascript skills are non-existent at best.

       

      I have a document extension, and it works perfectly when accessing an ajax version of the QlikView document.  But the extension doesn't fire on the workbench page if the document is not loaded, hence my problem.

       

      When I attempt to migrate the code from the doc extension to the aspx page in the javascript code I get errors.

       

      Here is the javascript code I'm trying to apply:

      function getCookie(c_name)
      {
      var i,x,y,ARRcookies=document.cookie.split(";");
      for (i=0;i<ARRcookies.length;i++)
       {
       x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
       y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
                       x=x.replace(/^\s+|\s+$/g,"");
                            if (x==c_name)
                                                  {
                                                            return unescape(y);
                                                  }
                                      }
                          }
      
      
       QvInit = function () {
                     var myDoc = Qv.GetCurrentDocument();
                     var myLocale = getCookie("QVLocale");
                     myDoc.SetVariable("vLocale",myLocale);
      }
      
      function loadQVInit(
      {
           QvInit();
      }
      

       

      And here is an example of my aspx page:

      <body onload="loadQVInit()" oncontextmenu="return false;">
          <form id="form1" runat="server">
              <div>
              </div>
          <table>
              <tr>
                  <td width="294px">
                  </td>
                  <td width="55px">
                      <qww:QvObject ID="QvObject1" runat="server" Height="20px" ObjectID="BU_RA_BACK" 
                          ObjectType="Button" QlikViewDocument="DocName" Width="50px" />
                  </td>
      </table>
      </form>
      </body>
      

       

      Any and all help is greatly appreciated.