Popups - Containing links/events/functions

446
1
03-15-2021 09:46 AM
JessicaRamirez1
New Contributor II

Hi,

I am new to JavaScript and coding in general. I desperately need some assistance. 

I am trying to create a popup that contains a table. In the table I need to have links to URLs and have some functions. Such as when a user clicks on a word in the table something happens like toggling on or off a layer and opening another popup. 

Also, I have the popup information in a side panel. I would like to make the layer name in the panel collapsible, as well as each features popup.

I hope that this makes sense .

If anyone is able to help let me know and I'll give you a link to my codepen

Tags (2)
0 Kudos
1 Reply
JeffreyWilkerson
Occasional Contributor II

Jessica, it's good that you have some well defined parameters.  You are looking for a widget or control that will provide certain properties, methods, and events.  With this information, you need to evaluate either the ArcGIS Javascript API 3.X (3.35 now I think) or the 4.X (4.18 now) version and determine if the widget/control as defined by these API's is sufficient for your purposes.  In regards to table views, I think the biggest difference between 3 and 4 versions is that 4 is just getting into editing, and there's still some issues with that.  Since you seem to not need editing I would look at either.  

By going to the API web sites, you should look at the samples page.  From the many samples it should be easy to determine if the API in question can provide you with what you seek.  The samples also show you how to construct a complete program following ArcGIS Javascript API recommended development patterns.  You can easily string multiple samples together to get what you are looking for, if that's needed as well.  Just type ArcGIS Javascript API 3.x into a browser and it'll take you to a page that you can access either API from.

Once you feel you have found a control/widget that will provide you what is needed, visit the specific page for it and look at its properties, methods, and events to see if you can further develop its capacity beyond what was available in the sample(s).  If you can't come across a widget/control that is functional to your particular needs, you may need to go further such as looking at Dojo (which the APIs are based on), and maybe specifically Dgrid for more access to a table widget (as far as the properties, methods, and events).  

Whatever direction you decide on going, once you get started and run into some issues you can always throw up some code to the Community web site to ask for further help.  Or start a ticket with Esri directly if you are under a maintenance contract.

This is a broad question and sorry but I had to give a broad answer.  Happy hunting and good luck!