Unfortunately, I cannot connect to the element within the popup via ID or Class. Any thoughts?
What's not working? (what have you tried?)
popupTemplate = new esri.dijit.PopupTemplate({ title: "{building_name}", //description: "<h4>{building_name}</h4><hr/>{Short_Desc}", description: "{Short_Desc}"+"</br><div id='expandoPopLink' data-dojo-type='dijit.form.Button'></div>", mediaInfos: [{ "type": "image", "value": { "sourceURL": "{image_path}", "linkURL": "{image_path}" } }] });
expandoPopLink = document.getElementById("expandoPopLink"); expandoPopLink = dojo.byId('expandoPopLink'); expandoPopLink.click = function() { alert("turkey"); } dojo.connect(".expandoPopLink", "onClick", function() { alert("this works"); }); expandoPopLink = dojo.query(".expandoPopLink")[0]; expandoPopLink = document.getElementById("expandoPop"); console.log(expandoPopLink); dojo.connect(expandoPopLink, "onClick", function() { alert("turkey"); }); expandoPopLink.click = function() { alert("turkey"); } dojo.connect(dijit.byId("expandoPopLink"), "onClick", function() { console.log("button in popup clicked"); alert("turkey"); });
I've been told by another source that it's DOM methods only within the popup.- d
expandoPopLink = document.getElementById("expandoPopLink");
dojo.connect(expandoPopLink, "onclick", derek);
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.