<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: simple extension query! function undefined in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197886#M1237014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a little rusty here, but shouldn't the HTML definition be:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;html="&amp;lt;div id='#" + divName + "' class='sidenav'&amp;gt;" &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the call be:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;document.getElementById("#" + divName).style.width = "250px"; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I am assuming that divName is a variable.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Oct 2016 12:53:13 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2016-10-14T12:53:13Z</dc:date>
    <item>
      <title>simple extension query! function undefined</title>
      <link>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197885#M1237013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A simple one I am sure but it has been a long week.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is the simple code I am wiring for a menu, why do I get a function undefined error for my close / open navs when I click the various items (the click works with a simple console.log)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14764487595928739 jive_text_macro" jivemacro_uid="_14764487595928739"&gt;
&lt;P&gt;html="&amp;lt;div id=''#' + divName' class='sidenav' &amp;gt;&amp;nbsp; "&lt;/P&gt;
&lt;P&gt;html = html+"&amp;lt;a href='javascript:void(0)' id='closebtn' class='closebtn' onclick='closeNav()'&amp;gt;&amp;amp;times;&amp;lt;/a&amp;gt;"&lt;/P&gt;
&lt;P&gt;html = html+"&amp;lt;a href='#'&amp;gt;About&amp;lt;/a&amp;gt;"&lt;/P&gt;
&lt;P&gt;html = html+" &amp;lt;a href='#'&amp;gt;Services&amp;lt;/a&amp;gt;"&lt;/P&gt;
&lt;P&gt;html = html+"&amp;nbsp; &amp;lt;a href='#'&amp;gt;Clients&amp;lt;/a&amp;gt;"&lt;/P&gt;
&lt;P&gt;html = html+"&amp;nbsp; &amp;lt;a href='#'&amp;gt;Contact&amp;lt;/a&amp;gt;"&lt;/P&gt;
&lt;P&gt;html = html+"&amp;lt;/div&amp;gt;"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;html = html+"&amp;lt;span style='font-size:30px;cursor:pointer' onclick='openNav()'&amp;gt;open&amp;lt;/span&amp;gt;"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* Set the width of the side navigation to 250px */&lt;/P&gt;
&lt;P&gt;function openNav() {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById("'#' + divName").style.width = "250px";&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* Set the width of the side navigation to 0 */&lt;/P&gt;
&lt;P&gt;function closeNav() {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById("'#' + divName").style.width = "0";&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;_this.Element.innerHTML = html;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197885#M1237013</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2026-01-26T16:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: simple extension query! function undefined</title>
      <link>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197886#M1237014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a little rusty here, but shouldn't the HTML definition be:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;html="&amp;lt;div id='#" + divName + "' class='sidenav'&amp;gt;" &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the call be:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;document.getElementById("#" + divName).style.width = "250px"; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I am assuming that divName is a variable.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 12:53:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197886#M1237014</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-10-14T12:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: simple extension query! function undefined</title>
      <link>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197887#M1237015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think so, purely because it displays OK and even if I simplify the function to a console.log, it won't call it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 13:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197887#M1237015</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-10-14T13:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: simple extension query! function undefined</title>
      <link>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197888#M1237016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That isn't to say that you are not correct of course, I just don't think it is the cause (buit I will try it )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 13:01:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197888#M1237016</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-10-14T13:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: simple extension query! function undefined</title>
      <link>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197889#M1237017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The HTML will work, but I think the div name is actually something like&amp;nbsp; &lt;EM&gt;#'+divName &lt;/EM&gt;(literally and no leading quote) and getElementById is looking for&amp;nbsp; '&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;#'+divName &lt;/EM&gt;&lt;/SPAN&gt;(literally and with leading quote). Or at very least, getElementById is returning undefined and then the .style.width properties also undefined....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I last did much DOM/js programming about 5 years ago, so I am very rusty &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 13:21:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197889#M1237017</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-10-14T13:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: simple extension query! function undefined</title>
      <link>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197890#M1237018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah I am trying to self-learn it and its a bit of a headache!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So just to simplify it right out:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14764550344573474 jive_text_macro" jivemacro_uid="_14764550344573474"&gt;
&lt;P&gt;_this.Element.innerHTML = "&amp;lt;span style='font-size:30px;cursor:pointer' onclick='console.log(123)'&amp;gt;open&amp;lt;/span&amp;gt;"&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas this doesn't (testClick is undefined)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14764550994655519" jivemacro_uid="_14764550994655519"&gt;
&lt;P&gt;_this.Element.innerHTML = "&amp;lt;span style='font-size:30px;cursor:pointer' onclick='testClick'&amp;gt;open&amp;lt;/span&amp;gt;"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;function testClick(){&lt;/P&gt;
&lt;P&gt;&amp;nbsp; console.log(123);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the innerHTML object can't see the function.... I mean I get local and global scope etc within JS but not quite how that fits with the innerHTML element!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 14:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-extension-query-function-undefined/m-p/1197890#M1237018</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-10-14T14:26:04Z</dc:date>
    </item>
  </channel>
</rss>

