<?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 Cannot call function from Index_user_script.js - Why? in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088610#M64459</link>
    <description>&lt;P style="font-size: 13.008px;"&gt;Hello,&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I am having a lot of problems trying to get a function to kick in when my sidebar close button is clicked.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;in the Intel&amp;nbsp;Sdk&amp;nbsp;there is&amp;nbsp;apart&amp;nbsp;that shows this:&lt;/P&gt;

&lt;PRE class="brush:jscript;" style="font-size: 13.008px;"&gt;        /* listitem  Close Side bar */
    $(document).on("click", ".uib_w_17", function(evt)
    {
         /*global uib_sb */
         /* Other possible functions are: 
           uib_sb.open_sidebar($sb)
           uib_sb.close_sidebar($sb)
           uib_sb.toggle_sidebar($sb)
            uib_sb.close_all_sidebars()
          See js/sidebar.js for the full sidebar API */
        
         uib_sb.toggle_sidebar($(".uib_w_1")); 
         setTimeout(show_interstitial_app, 3000);&amp;lt;--My function
         return false;
    });&lt;/PRE&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;In the index.html&amp;nbsp;file&amp;nbsp;I created &amp;nbsp;a function as:&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;function show_interstitial_app(){&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; AdMob.createBanner( {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; adId: admobid.banner,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; position: AdMob.AD_POSITION.BOTTOM_CENTER,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; isTesting: true, // TODO: remove this line when release&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; overlap: false,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; offsetTopBar: false,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; bgColor: 'black'&lt;BR /&gt;
	&amp;nbsp; } );&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I am not asking any help about the code itself, but why I cannot call my function&lt;/P&gt;

&lt;PRE class="brush:jscript;" style="font-size: 13.008px;"&gt;setTimeout(show_interstitial_app, 3000);&lt;/PRE&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;(from another js file) using the&amp;nbsp;Index_user_script.js?&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Where is the catch please as I cannot work this one out....&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I am just trying to get a delay on an interstitial ad from ad mob&amp;nbsp;cordova,&amp;nbsp;thats&amp;nbsp;all.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Thanks.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Ben&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2016 12:48:00 GMT</pubDate>
    <dc:creator>ben4</dc:creator>
    <dc:date>2016-09-23T12:48:00Z</dc:date>
    <item>
      <title>Cannot call function from Index_user_script.js - Why?</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088610#M64459</link>
      <description>&lt;P style="font-size: 13.008px;"&gt;Hello,&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I am having a lot of problems trying to get a function to kick in when my sidebar close button is clicked.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;in the Intel&amp;nbsp;Sdk&amp;nbsp;there is&amp;nbsp;apart&amp;nbsp;that shows this:&lt;/P&gt;

&lt;PRE class="brush:jscript;" style="font-size: 13.008px;"&gt;        /* listitem  Close Side bar */
    $(document).on("click", ".uib_w_17", function(evt)
    {
         /*global uib_sb */
         /* Other possible functions are: 
           uib_sb.open_sidebar($sb)
           uib_sb.close_sidebar($sb)
           uib_sb.toggle_sidebar($sb)
            uib_sb.close_all_sidebars()
          See js/sidebar.js for the full sidebar API */
        
         uib_sb.toggle_sidebar($(".uib_w_1")); 
         setTimeout(show_interstitial_app, 3000);&amp;lt;--My function
         return false;
    });&lt;/PRE&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;In the index.html&amp;nbsp;file&amp;nbsp;I created &amp;nbsp;a function as:&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;function show_interstitial_app(){&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; AdMob.createBanner( {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; adId: admobid.banner,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; position: AdMob.AD_POSITION.BOTTOM_CENTER,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; isTesting: true, // TODO: remove this line when release&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; overlap: false,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; offsetTopBar: false,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; bgColor: 'black'&lt;BR /&gt;
	&amp;nbsp; } );&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I am not asking any help about the code itself, but why I cannot call my function&lt;/P&gt;

&lt;PRE class="brush:jscript;" style="font-size: 13.008px;"&gt;setTimeout(show_interstitial_app, 3000);&lt;/PRE&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;(from another js file) using the&amp;nbsp;Index_user_script.js?&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Where is the catch please as I cannot work this one out....&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I am just trying to get a delay on an interstitial ad from ad mob&amp;nbsp;cordova,&amp;nbsp;thats&amp;nbsp;all.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Thanks.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;Ben&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 12:48:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088610#M64459</guid>
      <dc:creator>ben4</dc:creator>
      <dc:date>2016-09-23T12:48:00Z</dc:date>
    </item>
    <item>
      <title>Hi Ben,</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088611#M64460</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi Ben,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Try placing your function in app.js file.&lt;/P&gt;

&lt;P&gt;Because index.html is modified a lot by Designer, seems better to me to place the code in files that are only manually edited.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 14:17:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088611#M64460</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-09-23T14:17:53Z</dc:date>
    </item>
    <item>
      <title>Thanks, unfortunately I</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088612#M64461</link>
      <description>&lt;P&gt;Thanks, unfortunately I cannot because it has to be placed in the body of the app.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 15:18:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088612#M64461</guid>
      <dc:creator>ben4</dc:creator>
      <dc:date>2016-09-23T15:18:47Z</dc:date>
    </item>
    <item>
      <title>This is strange, I added this</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088613#M64462</link>
      <description>&lt;P&gt;This is strange, I added this function into index.html:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;&amp;lt;script&amp;gt;
function test(){console.log('hello');}
&amp;lt;/script&amp;gt;
&lt;/PRE&gt;

&lt;P&gt;In three places: between body tags and before and after the including of index_user_script.js on header tag. And in all places it works.&lt;/P&gt;

&lt;P&gt;But my tests were only with Simulator.&lt;/P&gt;

&lt;P&gt;Did you check the console for errors?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 17:35:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088613#M64462</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-09-23T17:35:10Z</dc:date>
    </item>
    <item>
      <title>Yes earlier on I tried to</title>
      <link>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088614#M64463</link>
      <description>&lt;P&gt;Yes earlier on I tried to include this ad code above the body and on the mobile, no ads were showing. This is why I am forced to add this code in the body itself. No problem I have done it and it is working now:-)&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 17:44:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Cannot-call-function-from-Index-user-script-js-Why/m-p/1088614#M64463</guid>
      <dc:creator>ben4</dc:creator>
      <dc:date>2016-09-23T17:44:15Z</dc:date>
    </item>
  </channel>
</rss>

