JavaScript is case-sensitive. Your function name is "myzoom" but your onClick says "myZoom".I probably should have posted a more complete code sample in the other thread where this was recently discussed. Here's a simple page demoing this:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Zoom to Extent Test</title>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.6"></script>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/1.6/js/dojo/dijit/themes/tundra/tundra.css">
<script type="text/javascript">djConfig = { parseOnLoad: true }</script>
<script type="text/javascript">
dojo.require("esri.map");
var map, layer;
function Init() {
map = new esri.Map("mapDiv");
layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer");
map.addLayer(layer);
dojo.connect(dojo.byId('button2'), 'onclick', myzoom);
}
function myzoom() {
console.log('my zoom fired');
var axtent = new esri.geometry.Extent(55.6153456, 5.7191691, 105.6673614, 37.0016790, map.SpatialReference);
// var axtent = new esri.geometry.Extent(105.6673614, 37.0016790, 55.6153456, 5.7191691, map.SpatialReference);
console.log('xmin: ', axtent.xmin, '; ymin: ', axtent.ymin);
map.setExtent(axtent);
}
dojo.ready(Init);
</script>
</head>
<body class="tundra">
<div id = "mapDiv" style="width:800px; height:300px"> </div>
<input id="button2" type="button" value="Zoom To India" />
</body>
</html>