title: jqgrid custom edit function undefined
body: <p>Ive just started playing with jqgrid and am experiencing a strange problem?</p>
  
  <p>ive copied the custom edit example from the jqgrid demo's site and have added an extra button </p>
  
  <p>my code:</p>
  
  <pre><code>gridComplete: function(){ 
              var ids = jQuery("#rowed2").jqGrid('getDataIDs'); 
              for(var i=0;i &lt; ids.length;i++){ var cl = ids[i]; 
                  be = "&lt;input style='height:22px;width:20px;' type='button' value='E' onclick=\"jQuery('#rowed2').editRow('"+cl+"');\" /&gt;"; 
                  se = "&lt;input style='height:22px;width:20px;' type='button' value='S' onclick=\"jQuery('#rowed2').saveRow('"+cl+"');\" /&gt;"; 
                  ce = "&lt;input style='height:22px;width:20px;' type='button' value='C' onclick=\"jQuery('#rowed2').restoreRow('"+cl+"');\" /&gt;";
                  gc = "&lt;input style='height:22px;width:20px;' type='button' value='G' onclick=\"geocodeMe("+cl+");\" /&gt;";
                  jQuery("#rowed2").jqGrid('setRowData',ids[i],{Actions:be+se+ce+gc}); 
              } 
          }
  </code></pre>
  
  <p>when i click the button labeled G it should i thoughr call my function</p>
  
  <p>but i get a js error that geocodeMe is undefined
  its in my code so dont know why it cant find it am guessing its a scope problem, any ideas how to fix it???</p>
  
  <p>the geocodeMe function:</p>
  
  <pre><code>function geocodeMe(myID) {
          // set default region
          region = 'uk';
          // address not empty
          removemarkers();
          $('#geo_detail').html('&lt;label&gt;Geocoding address...&lt;/label&gt;');
          // lookup the address
          var myData = $("#rowed2").getRowData(myID);
          address = myData.geoaddr_mdt;
          geocoder.geocode( {'address':address,'region':region}, function(results, status) {
              // if the address was found
              if(status == google.maps.GeocoderStatus.OK) {
                  $str = '&lt;label&gt;Geocode Successful&lt;br&gt; Lattitude: '+results[0].geometry.location.lat()+' Longitude: '+results[0].geometry.location.lng()+'&lt;br&gt; The address is displayed below and will be stored in the database.&lt;br&gt; If the address is incorrect you may edit it before saving the location to the database.&lt;br&gt;If the marker is in the wrong location you may drag it to where you  believe it should be.&lt;/label&gt;';
                  $('#geo_detail').html($str);
                  // insert lat/long into form
                  $('#lat').val(results[0].geometry.location.lat());
                  $('#lng').val(results[0].geometry.location.lng());
                  // create new lat/long object
                  latlng = new google.maps.LatLng(results[0].geometry.location.lat(),results[0].geometry.location.lng());
                  $('#disp_addr').val(address);
                  $('#form_buttons').show();
                  $('#detail_address').show();
                  //reverselookup(results[0].geometry.location.lat(), results[0].geometry.location.lng());
                  // set zoom option
                  map.setZoom(15);
                  // center the map on the new location
                  map.setCenter(results[0].geometry.location);
                  createMarker(map, latlng, true, false);
  
                  if(savetype ='update'){
                      savedata('update');
                  };
                  if(savedata='save'){
                      savedata('save');
                  };
              } else {
                  // display error
                  $('#geo_detail').append('&lt;label&gt;Geocoder failed to retrieve address: '+status+'&lt;/label&gt;');
                  $('#disp_addr').val($('#geo_addr').val());
              };
          });
      };
  </code></pre>