<?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: How to create new widget html nodes (objects) that call a function in widget.js when clicked in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290479#M7733</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for replying Robert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I am creating a list(s) of selected features that the user should be able to remove from a given list and/or zoom to (review) before submitting. The list(s) of features may will come from different layers and will be appended to as required. Essentially, it is a very dynamic list of selected features. I can add a 'Zoom To' button to the widget that will act on a selected feature from the list which has "data-dojo-attach-point" and "data-dojo-attach-event" already assigned so I can make the actions happen, but I thought it would be more intuitive for the user to have a zoom button per feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I beleive you are correct about it being a scoping issue and will do some more review in that area before continuing. I am not using lang.hitch at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help and I will let you know how it goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jul 2015 15:46:06 GMT</pubDate>
    <dc:creator>MikeWottrich</dc:creator>
    <dc:date>2015-07-02T15:46:06Z</dc:date>
    <item>
      <title>How to create new widget html nodes (objects) that call a function in widget.js when clicked</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290477#M7731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for pointers on how to create new html nodes (objects) that call a function in widget.js when clicked. I can add new buttons through javascript and add a click event to a javascript function, but cannot seem to fire a function that is within widget.js&amp;nbsp; I'm sure this is fairly straight forward, but was hoping to get some help from seasoned programmers on how to do it and best practices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like an html button that is already there when the widget opens can fire use functions in widget.js, but new ones are causing me a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any and all help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 15:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290477#M7731</guid>
      <dc:creator>MikeWottrich</dc:creator>
      <dc:date>2015-07-02T15:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create new widget html nodes (objects) that call a function in widget.js when clicked</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290478#M7732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I don't do a lot of dynamic building of objects though JS in my widgets. I normally have everything templated out and the html already has all the html buttons, etc with "data-dojo-attach-point" and "data-dojo-attach-event" already assigned. Is there a reason that you can not design dijits for the portions of your widget that has to dynamically change?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your issue is likely a scoping issue where your click event is in a different scope than your functions and thus your inability to call them, so are you using lang.hitch?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 15:34:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290478#M7732</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-02T15:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create new widget html nodes (objects) that call a function in widget.js when clicked</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290479#M7733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for replying Robert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I am creating a list(s) of selected features that the user should be able to remove from a given list and/or zoom to (review) before submitting. The list(s) of features may will come from different layers and will be appended to as required. Essentially, it is a very dynamic list of selected features. I can add a 'Zoom To' button to the widget that will act on a selected feature from the list which has "data-dojo-attach-point" and "data-dojo-attach-event" already assigned so I can make the actions happen, but I thought it would be more intuitive for the user to have a zoom button per feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I beleive you are correct about it being a scoping issue and will do some more review in that area before continuing. I am not using lang.hitch at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help and I will let you know how it goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 15:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290479#M7733</guid>
      <dc:creator>MikeWottrich</dc:creator>
      <dc:date>2015-07-02T15:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create new widget html nodes (objects) that call a function in widget.js when clicked</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290480#M7734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you create your dynamic feature list, you need to lang.hitch them during that time otherwise run time, the scope will be off as you mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.own(on(Node, 'click', lang.hitch(this, "MyWidgetJSFunctionInTheseQoutes", param1, param2, etc)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 16:17:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290480#M7734</guid>
      <dc:creator>PrevinWong1</dc:creator>
      <dc:date>2015-07-02T16:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to create new widget html nodes (objects) that call a function in widget.js when clicked</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290481#M7735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Previn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will let you know how it goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 16:21:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-to-create-new-widget-html-nodes-objects-that/m-p/290481#M7735</guid>
      <dc:creator>MikeWottrich</dc:creator>
      <dc:date>2015-07-02T16:21:38Z</dc:date>
    </item>
  </channel>
</rss>

