Select to view content in your preferred language

Button inside an info window

353
0
04-28-2021 04:26 AM
Nadir_Hussain
Occasional Contributor

Dear All,

 i have a html button inside contents of infowindow.like below code

 

strContent = strContent + "<tr>" + "<td align=center colspan=2 >" + "<button type=button class=button onclick=" + getReport(idResult.layerId, feat.feature.attributes.OBJECTID_1) + ">تقرير</button> " + "</td>"
 strContent = strContent + "<tr>" + "<td align=center colspan=2 >" + "<a href=" + strLyr + ">المزيد من المعلومات</a> " + "</td>"

this show me two buttons inside infowindow.one is hyperlink and other is command button.hyperlink working perfect.problem is with command button.

function getReport(id,objID)

{

  alert("hello");

 

}

problem is when i use identify to show info window the command button click event call on map click.when i click on button nothing happened.i want this getReport function should be called when i click button inside info window.please help thanks in adavnce.i am using arcgis 3.32 api.

Thanks

0 Kudos
0 Replies