LocateButton in JS

Discussion created by abdulazizfarooqi on Nov 3, 2013
I m new to ARCGIS, I need to consume the LocateButton widget,
but in abvoe example, i dont want user to click for location, it should automatically come, i.e.
X and Y Cordinates I already having, in our database, i need widget_locate function to fun on page load.

Kindly help, where can i get this funciton to execute whenever i need to execute on page.