Select to view content in your preferred language

Text only SearchWidget

636
1
10-04-2010 05:53 PM
AthinaPascoe-Bell
Deactivated User
Hello, my searchWidget displays the graphical search by default. How do I get it to use the Text search instead?

Thanks, Athina.
0 Kudos
1 Reply
AthinaPascoe-Bell
Deactivated User
I'm answering my own question.... There were some typo's in the original code which I needed to fix, so here they are:

These changes come from http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&script... Thanks to everyone who posted fixes - yes I copied and pasted.

There are more fixes reported on this site than those liseted below, in particular issues with IE were addressed but I'll be looking at that later as I was just trying to get the text search working.



Changes to index.html (update to JS 1.4)
a) Change three occurrences of 1.2 to 1.4
b) enclose the onPageResizeHandler function inside a try..catch block

Changes to WidgetFrame.js
c) There is a typo in the postCreate function (approx line 83) Change: this.titleNode = dojo.query("#.widgetTitle", this.domNode)[0]; To: this.titleNode = dojo.query(".widgetTitle", this.domNode)[0]; by removing the #.
d) Insert the following statement near the top of the file dojo.require("dijit._Contained");

Changes to _Widget.js
e) Insert the following statement near the top of the file dojo.require("dijit._Contained"); Additionally,
f) add the .json MIME type to your web server

Changes to MapManager.js
(approx. lines 183 and following, there is a syntax error : if (layer.loaded) { // IE caching behavior, loaded is true right away. this._layerLoadHander(layer); } else { dojo.connect(layer, "onLoad", dojo.hitch(this,"_layerLoadHandler", layer)); } --> this._layerLoadHander has to be replaced by this._layerLoadHandler in order to effectively call the function.

For version 1.3 or higher, you use "esri.config" in place of "esriConfig". Although "esriConfig" will continue to work with version 1.3, you should update your applications to use "esri.config" instead. (index.html and Datamanager.js
0 Kudos