IdentifyTask issues with IE 7 & 8

572
6
01-13-2012 08:33 AM
andrewj_ca
Occasional Contributor II
I've been having some issues with the IdentifyTask returning results when it's executed using IE 7 or 8.  The task runs flawlessly In IE9 and any other browser.  I've logged a support call but wondered if anybody has run into this issue.  It's almost like the task isn't even executed.
0 Kudos
6 Replies
derekswingley1
Frequent Contributor
If you're identify operation returns a lot of data, IE 7/8 could be choking on it. Have you tried running an identify that returns only a couple of features? Does it work if you specify return geometry = false?
0 Kudos
KellyHutchins
Esri Frequent Contributor
Can you reproduce the issue with the Identify samples in the help?

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm

If not can you post a test case or some sample code?
0 Kudos
andrewj_ca
Occasional Contributor II
Here's a sample in use:

http://maps-dev.niagararegion.ca/Navigator/lte/?site=waste

I removed the return geometry and had the same results.  Each identify is only for one object typically anyways.
0 Kudos
KellyHutchins
Esri Frequent Contributor
Andrew,

Not sure if this is the issue but I don't see where you've defined the identifyTask or identifyParams using var. IE has issues with missing vars along with trailing commas and missing semicolons that other browsers seem to ignore. Try adding var to these statements:

 identifyTask = new esri.tasks.IdentifyTask(service);

identifyParams = new esri.tasks.IdentifyParameters();
0 Kudos
derekswingley1
Frequent Contributor
Line 262 in main.js is:
var i = lyrArr.indexOf(result.layerName);


This works in the awesome browsers because arrays natively have an indexOf method. But poor IE... no one gave its arrays an indexOf method.

Try this instead:
dojo.indexOf(lyrArr, result.layerName)
0 Kudos
andrewj_ca
Occasional Contributor II
@derekswingley

That was this issue.  Makes me wonder why I placed a support call. First stop will be the forum next time.  Thanks, that was preventing roll-out.
0 Kudos