<?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: Call function in href from infoWindow in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714609#M66386</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you seen this &lt;A href="https://developers.arcgis.com/javascript/jssamples/gp_popuplink.html"&gt;sample&lt;/A&gt; that contains a link to a function in a infoWindow?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2015 13:03:40 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2015-01-29T13:03:40Z</dc:date>
    <item>
      <title>Call function in href from infoWindow</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714608#M66385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to put either an href link or a button in a infoWindow in one of my javascript mobile apps.&amp;nbsp; The info window tells the cell value of a feature layer that is clicked on.&amp;nbsp; Then I have added an infoWindow that calls a functions which should run a geoprocessing task.&amp;nbsp; The problem is the link cannot seem to find the function no matter where I put it in my code.&amp;nbsp; I am getting an error "Uncaught ReferenceError: MyFunction is not defined.&amp;nbsp; Is it not possible to call a javascript function from an infoWindow?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 23:36:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714608#M66385</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2015-01-28T23:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Call function in href from infoWindow</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714609#M66386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you seen this &lt;A href="https://developers.arcgis.com/javascript/jssamples/gp_popuplink.html"&gt;sample&lt;/A&gt; that contains a link to a function in a infoWindow?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 13:03:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714609#M66386</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-01-29T13:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Call function in href from infoWindow</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714610#M66387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Ken, I did see that sample, but was unable to figure out how to get that link into my infoWindow just by looking at the code.&amp;nbsp; I am able to get an href link into my infoWindow, but I am not certain why the href link isn't able to call any functions within my javascript.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 18:17:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714610#M66387</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2015-01-29T18:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Call function in href from infoWindow</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714611#M66388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post your code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 19:16:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714611#M66388</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-01-29T19:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Call function in href from infoWindow</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714612#M66389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it helps, I do this in one of my applications. The infoWindow appears and has two buttons that the user can click which fires off a function that generates a report. Here's the entire function for the content of my infoWindow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;function SetSwmPopupInfo(graphic) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; var fullAttr = graphic.attributes;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var rptParam, content, theProjID, theTipType;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var theCipID = fullAttr.ProjectNo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rptParam = "'" + graphic.attributes.OBJECTID + ',' + graphic.geometry.type + ',' + "SWM" + "'";&lt;/P&gt;&lt;P&gt;&amp;nbsp; rptProjectName = graphic.attributes.ProjTitle;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (theCipID.length &amp;gt; 1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; theProjID = fullAttr.ProjectNo;&lt;/P&gt;&lt;P&gt;&amp;nbsp; } else {&lt;/P&gt;&lt;P&gt;&amp;nbsp; theProjID = "Unknown";&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; content = '&amp;lt;table width=\"100%\"&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td valign=\'top\' style=\"font-weight:bold;padding-left:3px;padding-right:3px\"&amp;gt;Project Name:&amp;lt;/td&amp;gt;&amp;lt;td valign=\'top\' style=\"padding-left:3px;padding-right:3px\"&amp;gt;' + fullAttr.ProjTitle + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/P&gt;&lt;P&gt;&amp;nbsp; content = content + '&amp;lt;tr&amp;gt;&amp;lt;td valign=\'top\' style=\"font-weight:bold;padding-left:3px;padding-right:3px;vertical-align:top\"&amp;gt;CIP Project ID:&amp;lt;/td&amp;gt;&amp;lt;td valign=\'top\' style=\"padding-left:3px;padding-right:3px;vertical-align:top\"&amp;gt;' + theProjID + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/P&gt;&lt;P&gt;&amp;nbsp; content = content + '&amp;lt;tr&amp;gt;&amp;lt;td valign=\'top\' style=\"font-weight:bold;padding-left:3px;padding-right:3px;vertical-align:top\"&amp;gt;Type of Project:&amp;lt;/td&amp;gt;&amp;lt;td valign=\'top\' style=\"padding-left:3px;padding-right:3px;vertical-align:top\"&amp;gt;' + fullAttr.Category.toProperCase() + '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/P&gt;&lt;P&gt;&amp;nbsp; content = content + '&amp;lt;tr&amp;gt;&amp;lt;td colspan=\"2\" align=\"center\"&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;button id=\"reportButton\" type=\"button\" onclick=\"getTractProjectReport(' + rptParam + ')\"&amp;gt;View a Summary Demographic Report&amp;nbsp;&amp;nbsp;(Census Tract Level)&amp;lt;/button&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/P&gt;&lt;P&gt;&amp;nbsp; content = content + '&amp;lt;tr&amp;gt;&amp;lt;td colspan=\"2\" align=\"center\"&amp;gt;&amp;lt;button id=\"reportBlockButton\" type=\"button\" onclick=\"getBlockProjectReport(' + rptParam + ')\"&amp;gt;View a Summary Demographic Report&amp;nbsp;&amp;nbsp;(Block Group Level)&amp;lt;/button&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; return content;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Make sure the function you are trying to call is located within the function of your AMD requires:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;require([&lt;SPAN class="pln"&gt;&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"esri/map""], function("Map") {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Place your called function inside and at the end of this space&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 21:48:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/call-function-in-href-from-infowindow/m-p/714612#M66389</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-01-29T21:48:13Z</dc:date>
    </item>
  </channel>
</rss>

