<?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 Trigger find() or search method of Geocoder widget friom programmatic enter or return event on Sear_input in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/trigger-find-or-search-method-of-geocoder-widget/m-p/542387#M3655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am utilizing a Geocoder widget for my company project and it is being used in our website as an iframe. I want to trigger find() to invoke search_input&lt;/P&gt;&lt;P&gt;The Geocoder search input in teh below html gets populated when I enter an address in the parent html and the Requirement is when I click submit from parent window, or focus outfrom the field in parent window I want to fire search in the autopopulated Geocoder search input.&lt;/P&gt;&lt;P&gt;The Geocoder input doesn't search even if I programmatically click no the search icon using&amp;nbsp; &lt;BR /&gt;1. $("div.esriGeocoderSearch.esriGeocoderIcon").click(); doesnt work&lt;BR /&gt;2. Nor a programamitc Keydown event on search input ofteh Geocoder&amp;nbsp; works&lt;/P&gt;&lt;P&gt;Is there a away to call the geocoders find() from another method to trigger the search like using something as&amp;nbsp; geocoder.find();&lt;/P&gt;&lt;P&gt;Here is the mapless.js which is being utilized in the html&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt;"esri/map",&lt;BR /&gt;"dojo/dom", &lt;BR /&gt;"dojo/on",&lt;BR /&gt;"esri/tasks/query", &lt;BR /&gt;"esri/tasks/QueryTask", &lt;BR /&gt;"esri/dijit/Geocoder",&lt;BR /&gt;"dijit/form/RadioButton",&lt;BR /&gt;"dojo/parser", "dijit/registry",&lt;BR /&gt;"dojo/domReady!"&lt;BR /&gt;], function (Map, dom, on, Query, QueryTask, Geocoder, RadioButton, parser, registry ) { &lt;BR /&gt;parser.parse();&lt;/P&gt;&lt;P&gt;var queryTask = new QueryTask("&lt;A href="http://services2.arcgis.com/mJaJSax0KPHoCNB6/ArcGIS/rest/services/DACTracts30/FeatureServer/0"&gt;http://services2.arcgis.com/mJaJSax0KPHoCNB6/ArcGIS/rest/services/DACTracts30/FeatureServer/0&lt;/A&gt;");&lt;BR /&gt;geocoder = new Geocoder({ &lt;BR /&gt;//map: map,&lt;BR /&gt;autoComplete: true, &lt;BR /&gt;arcgisGeocoder: {&lt;BR /&gt;placeholder: "Please Enter an Address",&lt;BR /&gt;sourceCountry: "USA",&lt;BR /&gt;postfix:"CA"&lt;BR /&gt;} &lt;BR /&gt;}, dojo.byId("search"));&lt;BR /&gt;//geocoder.on("select", showResults);&lt;BR /&gt;geocoder.on('find-results', showResults);&lt;BR /&gt;geocoder.startup();&lt;/P&gt;&lt;P&gt;function showResults (evt) {&lt;BR /&gt;/&lt;BR /&gt;console.log(evt);&lt;BR /&gt;if(evt.results.results.length &amp;gt; 0){&lt;BR /&gt;console.log(geocoder.results);&lt;BR /&gt;//var point = evt.result.feature.geometry, DAC;&lt;BR /&gt;var point = evt.results.results[0].feature.geometry;&lt;BR /&gt;var lat = point.getLatitude(), lon=lon=point.getLongitude();&lt;BR /&gt;var query = new Query();&lt;BR /&gt;query.returnGeometry = false;&lt;BR /&gt;query.outFields = ["CENSUS_TRA","COUNTY","CITY","CES_3_0_Sc"];&lt;BR /&gt;query.geometry = point;&lt;BR /&gt;console.log(point);&lt;BR /&gt;queryTask.execute(query, function (featureSet) {&lt;BR /&gt;console.log(featureSet);&lt;BR /&gt;console.log(featureSet.features.length)&lt;BR /&gt;if (featureSet.features.length==0){&lt;BR /&gt;DAC= 'Location is not within a Disadvantaged Community';&lt;BR /&gt;} else { DAC='Location is within a Disadvantaged Community'};&lt;BR /&gt;console.log(DAC);&lt;BR /&gt;resultItems = [];&lt;BR /&gt;var resultCount = featureSet.features.length;&lt;BR /&gt;for (var i = 0; i &amp;lt; resultCount; i++) {&lt;BR /&gt;var featureAttributes = featureSet.features&lt;I&gt;.attributes;&lt;BR /&gt;for (var attr in featureAttributes) {&lt;BR /&gt;resultItems.push("&amp;lt;b&amp;gt;" + attr + ":&amp;lt;/b&amp;gt; " + featureAttributes[attr] + "&amp;lt;br&amp;gt;");&lt;BR /&gt;}&lt;BR /&gt;resultItems.push("&amp;lt;br&amp;gt;");&lt;BR /&gt;}&lt;BR /&gt;dojo.byId("geocodeResults").innerHTML = DAC;//resultItems.join("");&lt;BR /&gt;}); &lt;BR /&gt;} else { &lt;BR /&gt;dojo.byId("geocodeResults").innerHTML = "Address not found"; &lt;BR /&gt;}&lt;/I&gt;&lt;/P&gt;&lt;P&gt;//geocoder.clear();&lt;BR /&gt;//geocoder.destroy();&lt;BR /&gt;} &lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And the HTML is as follows:&lt;/P&gt;&lt;P&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;BR /&gt;&amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;Mapless DAC locator&amp;lt;/title&amp;gt;&lt;BR /&gt;&amp;lt;link rel="stylesheet" href="&lt;A href="https://js.arcgis.com/3.19/dijit/themes/claro/claro.css"&gt;https://js.arcgis.com/3.19/dijit/themes/claro/claro.css&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;link rel="stylesheet" href="&lt;A href="https://js.arcgis.com/3.19/esri/css/esri.css"&gt;https://js.arcgis.com/3.19/esri/css/esri.css&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;style&amp;gt;&lt;BR /&gt;html, body {&lt;BR /&gt;font:normal 12px verdana;&lt;BR /&gt;}&lt;BR /&gt;.results {&lt;BR /&gt;background-color:#eee;&lt;BR /&gt;width:300px;&lt;BR /&gt;height:35px;&lt;BR /&gt;text-indent: 10px;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;.dijitCheckBoxInput {&lt;BR /&gt;opacity: 100;&lt;BR /&gt;}&lt;BR /&gt;.dijitCheckBox, .dijitRadio, .dijitCheckBoxInput {&lt;BR /&gt;width: 14px;&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;/style&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="https://code.jquery.com/jquery-3.2.1.min.js&amp;quot;&amp;gt;&amp;lt;/script"&gt;https://code.jquery.com/jquery-3.2.1.min.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="https://js.arcgis.com/3.19/&amp;quot;&amp;gt;&amp;lt;/script"&gt;https://js.arcgis.com/3.19/"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="http://localhost:3000/js/trigger.js&amp;quot;&amp;gt;&amp;lt;/script"&gt;http://localhost:3000/js/trigger.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script src="&lt;A href="http://localhost:3000/js/mapless.js"&gt;http://localhost:3000/js/mapless.js&lt;/A&gt;"&amp;gt; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Please enter the property address:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&amp;lt;div id="search" style=""&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&amp;lt;span id="info"&amp;gt;&amp;lt;/span&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&amp;lt;div id="geocodeResults" class="results" style="text-indent:10px;"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div id="bldgResults" class="results"&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Apr 2017 15:35:46 GMT</pubDate>
    <dc:creator>amitchavan</dc:creator>
    <dc:date>2017-04-27T15:35:46Z</dc:date>
    <item>
      <title>Trigger find() or search method of Geocoder widget friom programmatic enter or return event on Sear_input</title>
      <link>https://community.esri.com/t5/developers-questions/trigger-find-or-search-method-of-geocoder-widget/m-p/542387#M3655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am utilizing a Geocoder widget for my company project and it is being used in our website as an iframe. I want to trigger find() to invoke search_input&lt;/P&gt;&lt;P&gt;The Geocoder search input in teh below html gets populated when I enter an address in the parent html and the Requirement is when I click submit from parent window, or focus outfrom the field in parent window I want to fire search in the autopopulated Geocoder search input.&lt;/P&gt;&lt;P&gt;The Geocoder input doesn't search even if I programmatically click no the search icon using&amp;nbsp; &lt;BR /&gt;1. $("div.esriGeocoderSearch.esriGeocoderIcon").click(); doesnt work&lt;BR /&gt;2. Nor a programamitc Keydown event on search input ofteh Geocoder&amp;nbsp; works&lt;/P&gt;&lt;P&gt;Is there a away to call the geocoders find() from another method to trigger the search like using something as&amp;nbsp; geocoder.find();&lt;/P&gt;&lt;P&gt;Here is the mapless.js which is being utilized in the html&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt;"esri/map",&lt;BR /&gt;"dojo/dom", &lt;BR /&gt;"dojo/on",&lt;BR /&gt;"esri/tasks/query", &lt;BR /&gt;"esri/tasks/QueryTask", &lt;BR /&gt;"esri/dijit/Geocoder",&lt;BR /&gt;"dijit/form/RadioButton",&lt;BR /&gt;"dojo/parser", "dijit/registry",&lt;BR /&gt;"dojo/domReady!"&lt;BR /&gt;], function (Map, dom, on, Query, QueryTask, Geocoder, RadioButton, parser, registry ) { &lt;BR /&gt;parser.parse();&lt;/P&gt;&lt;P&gt;var queryTask = new QueryTask("&lt;A href="http://services2.arcgis.com/mJaJSax0KPHoCNB6/ArcGIS/rest/services/DACTracts30/FeatureServer/0"&gt;http://services2.arcgis.com/mJaJSax0KPHoCNB6/ArcGIS/rest/services/DACTracts30/FeatureServer/0&lt;/A&gt;");&lt;BR /&gt;geocoder = new Geocoder({ &lt;BR /&gt;//map: map,&lt;BR /&gt;autoComplete: true, &lt;BR /&gt;arcgisGeocoder: {&lt;BR /&gt;placeholder: "Please Enter an Address",&lt;BR /&gt;sourceCountry: "USA",&lt;BR /&gt;postfix:"CA"&lt;BR /&gt;} &lt;BR /&gt;}, dojo.byId("search"));&lt;BR /&gt;//geocoder.on("select", showResults);&lt;BR /&gt;geocoder.on('find-results', showResults);&lt;BR /&gt;geocoder.startup();&lt;/P&gt;&lt;P&gt;function showResults (evt) {&lt;BR /&gt;/&lt;BR /&gt;console.log(evt);&lt;BR /&gt;if(evt.results.results.length &amp;gt; 0){&lt;BR /&gt;console.log(geocoder.results);&lt;BR /&gt;//var point = evt.result.feature.geometry, DAC;&lt;BR /&gt;var point = evt.results.results[0].feature.geometry;&lt;BR /&gt;var lat = point.getLatitude(), lon=lon=point.getLongitude();&lt;BR /&gt;var query = new Query();&lt;BR /&gt;query.returnGeometry = false;&lt;BR /&gt;query.outFields = ["CENSUS_TRA","COUNTY","CITY","CES_3_0_Sc"];&lt;BR /&gt;query.geometry = point;&lt;BR /&gt;console.log(point);&lt;BR /&gt;queryTask.execute(query, function (featureSet) {&lt;BR /&gt;console.log(featureSet);&lt;BR /&gt;console.log(featureSet.features.length)&lt;BR /&gt;if (featureSet.features.length==0){&lt;BR /&gt;DAC= 'Location is not within a Disadvantaged Community';&lt;BR /&gt;} else { DAC='Location is within a Disadvantaged Community'};&lt;BR /&gt;console.log(DAC);&lt;BR /&gt;resultItems = [];&lt;BR /&gt;var resultCount = featureSet.features.length;&lt;BR /&gt;for (var i = 0; i &amp;lt; resultCount; i++) {&lt;BR /&gt;var featureAttributes = featureSet.features&lt;I&gt;.attributes;&lt;BR /&gt;for (var attr in featureAttributes) {&lt;BR /&gt;resultItems.push("&amp;lt;b&amp;gt;" + attr + ":&amp;lt;/b&amp;gt; " + featureAttributes[attr] + "&amp;lt;br&amp;gt;");&lt;BR /&gt;}&lt;BR /&gt;resultItems.push("&amp;lt;br&amp;gt;");&lt;BR /&gt;}&lt;BR /&gt;dojo.byId("geocodeResults").innerHTML = DAC;//resultItems.join("");&lt;BR /&gt;}); &lt;BR /&gt;} else { &lt;BR /&gt;dojo.byId("geocodeResults").innerHTML = "Address not found"; &lt;BR /&gt;}&lt;/I&gt;&lt;/P&gt;&lt;P&gt;//geocoder.clear();&lt;BR /&gt;//geocoder.destroy();&lt;BR /&gt;} &lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And the HTML is as follows:&lt;/P&gt;&lt;P&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;&lt;BR /&gt;&amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;Mapless DAC locator&amp;lt;/title&amp;gt;&lt;BR /&gt;&amp;lt;link rel="stylesheet" href="&lt;A href="https://js.arcgis.com/3.19/dijit/themes/claro/claro.css"&gt;https://js.arcgis.com/3.19/dijit/themes/claro/claro.css&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;link rel="stylesheet" href="&lt;A href="https://js.arcgis.com/3.19/esri/css/esri.css"&gt;https://js.arcgis.com/3.19/esri/css/esri.css&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;style&amp;gt;&lt;BR /&gt;html, body {&lt;BR /&gt;font:normal 12px verdana;&lt;BR /&gt;}&lt;BR /&gt;.results {&lt;BR /&gt;background-color:#eee;&lt;BR /&gt;width:300px;&lt;BR /&gt;height:35px;&lt;BR /&gt;text-indent: 10px;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;.dijitCheckBoxInput {&lt;BR /&gt;opacity: 100;&lt;BR /&gt;}&lt;BR /&gt;.dijitCheckBox, .dijitRadio, .dijitCheckBoxInput {&lt;BR /&gt;width: 14px;&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;/style&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="https://code.jquery.com/jquery-3.2.1.min.js&amp;quot;&amp;gt;&amp;lt;/script"&gt;https://code.jquery.com/jquery-3.2.1.min.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="https://js.arcgis.com/3.19/&amp;quot;&amp;gt;&amp;lt;/script"&gt;https://js.arcgis.com/3.19/"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="http://localhost:3000/js/trigger.js&amp;quot;&amp;gt;&amp;lt;/script"&gt;http://localhost:3000/js/trigger.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script src="&lt;A href="http://localhost:3000/js/mapless.js"&gt;http://localhost:3000/js/mapless.js&lt;/A&gt;"&amp;gt; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Please enter the property address:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&amp;lt;div id="search" style=""&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&amp;lt;span id="info"&amp;gt;&amp;lt;/span&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&amp;lt;div id="geocodeResults" class="results" style="text-indent:10px;"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div id="bldgResults" class="results"&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 15:35:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/trigger-find-or-search-method-of-geocoder-widget/m-p/542387#M3655</guid>
      <dc:creator>amitchavan</dc:creator>
      <dc:date>2017-04-27T15:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger find() or search method of Geocoder widget friom programmatic enter or return event on Sear_input</title>
      <link>https://community.esri.com/t5/developers-questions/trigger-find-or-search-method-of-geocoder-widget/m-p/542388#M3656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its been amost a amonth and I don't find an answer to this question in any of the ESRI ARGIS forums or stack overflow.. So I just added this question here. &lt;/P&gt;&lt;P&gt;Does the find() method of Geocoder work??? when called from the method outside using&lt;/P&gt;&lt;P&gt;Does GEcoder Widget search input take programmatic enter events when triggered?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please provide a smaple code or suggestion..to make this work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2017 15:38:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/trigger-find-or-search-method-of-geocoder-widget/m-p/542388#M3656</guid>
      <dc:creator>amitchavan</dc:creator>
      <dc:date>2017-04-27T15:38:31Z</dc:date>
    </item>
  </channel>
</rss>

