AnsweredAssumed Answered

Tried to register widget with id==search but that id is already registered

Question asked by anojoomi on Jan 3, 2017
Latest reply on Jan 4, 2017 by rscheitlin


I have a small application in MVC. In this application users search for an address all results(one or more) will show in a select-able grid. When they select any one from the list a JQuery dialog shows the address demography along with a map that focuses on the address




var search = new Search({
map: map,
autoNavigate: true,
maxSuggestions: 1,
autoSelect: true,
autoNavigate: true,
value: address
}, "searchdiv");




<div id="searchdiv"></div>


The first address shows fine. then users closes the dialog and selects another address as soon as the code hits the var search = new Search

This error popsup on the screen.

0x800a139e - JavaScript runtime error: Tried to register widget with id==searchdiv but that id is already registered


I tried to destroy the search but does not work.


Any suggestion would be appreciated.