I am using ESRI JS API 3.24 in my application.

I am using following code to open specific URL within the application when click on the layer.

var lyrUrl = "Path_To_Layer";
var myLyr = new FeatureLayer(lyrUrl, {
 id: "some_id",
 mode: 1,
 outFields: ['ID', 'Name_English']

//Code for the specific URL to open in a new window
myLyr.on("click", function(evt) {
 var enName = myLyr._downGr.attributes.Name_English;
 window.open('main/' + enName + '/index.html');

The issue is that the click event is working fine in chrome, Edge but not in Firefox.

I mean not working is that when click on the layer, the link open in new page/tab but in Firefox, nothing happen at all.

Can someone help me in this?


The click handler works fine for me in Firefox - see this demo - if you click on one of the red points in Firefox the alert shows for me.

| improve this answer | |
  • Hey @GavinR, its very strange behavior of FF. It seems that now its working fine. Thanks for the answer. – AbdulAziz Jul 10 '18 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.