(Company Directory) Lookup Coordinates Button Missing

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

(Company Directory) Lookup Coordinates Button Missing

Post by inyerface »

The Lookup Coordinates button that is missing is specifically related to the "Frontend Edit Company Template". I just realized that it doesn't work from the admin panel either. Everything has been updated to the latest version and default templates reset.

CMSMS 1.11.11
Company Directory 1.22.6
CGExtensions 1.42.2
CGSimpleSmarty 1.7.4
JQueryTools 1.2.6

The script looks like this:

Code: Select all

{cge_have_module m='CGGoogleMaps' assign='tmp'}
{if $tmp}
<__script__ type="text/javascript">{jsmin}
var geocodeurl  = '{module_action_link module='CGGoogleMaps' action='getgeocode' urlonly=1}' + '&showtemplate=false';
{literal}
$(document).ready(function(){
 $('#lookupgoeshere').html('<input type="submit" id="lookup" name="lookup" value="{/literal}{$CompanyDirectory->Lang('lookup')}{literal}"/>');
 $('#lookup').live('click',function(e){
  var address = $('#address').val();
  if( address != '' ) {
    var url = geocodeurl.replace(/amp;/g,'');
    var lat = 0;
    var long = 0;
    $.post(url, 'cntnt01address='+address,
      function(data) { 
        if( data.status == 'success' ) {
          lat = data.lat; long=data.lon;
          $('#latitude').val(lat);
          $('#longitude').val(long);
        }
      }
      , "json" );
  }
  return false;
 });
});
{/literal}{/jsmin}</__script>
{/if}
Then in the template, the HTML is:

Code: Select all

<input type="text" id="address" name="{$actionid}cd_address" value="{$the_company->address}" size="30"/>
    &nbsp;
    <span id="lookupgoeshere"></span>
Am I missing something?
Post Reply

Return to “Modules/Add-Ons”