I want to call module function on button click in arcgis javascript, example,
dojo.connect(dom.byId("btnLocate"), "click", function ()
{
example();
});
function example()
{
alert("df");
myModule.queryStatesLayer();
}
<button style="height: 26px; width: 76px; margin-top: 22px;" name="btnLocate" onclick="example();">Locate</button>
here 'alert' is working but i can't access module function, how to call module function on button click? Please guide me with an example