[Cartoweb-users] tooltips plugin, AjaxPlugins not defined

Damien Corpataux damien.corpataux at camptocamp.com
Fri Oct 27 06:12:02 EDT 2006


Hi Vincent,

to fix the "AjaxPlugins is not defined" error, assuming you're running a 
CartoWeb 3.3.0, you can try to add the following lines at the very 
bottom of your project templates/cartoclient_ajaxHeader.tpl file:

{* Load the required libraries for Tooltips plugin if ajaxOn = false *}
{if $toolTips_active|default:'' && !$ajaxOn|default:''}
  <script type="text/javascript" src="{r 
type=js}jsTrace/dom-drag.js{/r}"></script>
  <script type="text/javascript" src="{r 
type=js}jsTrace/jsTrace.js{/r}"></script>
  <script type="text/javascript" src="{r type=js}prototype.js{/r}"></script>
  <script type="text/javascript" src="{r type=js}Logger.js{/r}"></script>
  <script type="text/javascript" src="{r 
type=js}AjaxHelper.js{/r}"></script>
  <script type="text/javascript" src="{r 
type=js}AjaxHandler.js{/r}"></script>
  <script type="text/javascript" src="{r 
type=js}AjaxPlugins.js{/r}"></script>
  <script type="text/javascript" src="{r 
type=js}overlib_mini.js{/r}"></script>
  <script type="text/javascript" src="{r type=js 
plugin=cartoMessages}CartoMessages.ajax.js{/r}"></script>
  <script type="text/javascript" src="{r type=js 
plugin=toolTips}ToolTips.ajax.js{/r}"></script>
{/if}


If your project is based on a cartoclient.tpl older than 3.3.0, simply 
insert the following into the <head> tag of your templates/cartoclient.tpl:

  {* Ajax related js includes - Debug Tool: jsTrace *}
  {* Remove these two links to get rid of the logger (i.e. in production 
mode *}
  {if $cartoclient_profile == 'development'}
    <script type="text/javascript" src="{r 
type=js}jsTrace/dom-drag.js{/r}"></script>
    <script type="text/javascript" src="{r 
type=js}jsTrace/jsTrace.js{/r}"></script>
  {/if}

  {* Ajax related js includes - External libraries *}
  <script type="text/javascript" src="{r type=js}prototype.js{/r}"></script>
  <script type="text/javascript" src="{r type=js}Logger.js{/r}"></script>

  {* Ajax related js includes - Global logic *}
  <script type="text/javascript" src="{r 
type=js}AjaxHelper.js{/r}"></script>
  <script type="text/javascript" src="{r 
type=js}AjaxHandler.js{/r}"></script>
  <script type="text/javascript" src="{r 
type=js}AjaxPlugins.js{/r}"></script>

  {if $toolTips_active|default:''}<script type="text/javascript" src="{r 
type=js}overlib_mini.js{/r}"></script>
    <script type="text/javascript" src="{r type=js 
plugin=toolTips}ToolTips.ajax.js{/r}"></script>
  {/if}

Damien



Vincent Picavet wrote:
> Hi there,
> First and before all, I would like to thank one more time the camp to camp 
> crew for their work at foss4g and the free beer (free as in beer ;).
> That said, here are my troubles with cartoweb.
> I try to get the tooltips plugin running, in Mouse Timeout Asynchronous mode.
>
> I enabled ajax in client.ini, added "toolTips" module in client.ini 
> (client.ini.in actually) and server_conf ini file. 
> I configured a tooTips.ini file with the right options and connexion to the 
> database. I created a main template file as well, matching the name in 
> toolTips.ini
> I then ran cw3setup with install, clean and development profile options.
>
> Now when I run client.php, the map displays correctly, but no tooltip appears.
> There actually is a Javascript error : 
>
> "AjaxPlugins is not defined"            client.php (line 83)
>
> This error occurs on the first line of function initToolTips :
>
> ------
>  /* Assigns JS state variables:
>  * layerListIds and scale for toolTipsRequests
>  */
>
>  function initToolTips() {
>  if (typeof(AjaxPlugins.ToolTips) != 'undefined') {
>
>  AjaxPlugins.ToolTips.serviceUrl = './client.php?toolTips=1';
>  AjaxPlugins.ToolTips.charSet = 'utf-8';
>  AjaxPlugins.ToolTips.lang = '';
>
>  }
> --------
>
> Do you have any directions for me to work on in order to know what happens and 
> fix it ?
>
> One other thing is that the graphical log viewer is not visible any more, even 
> if i really am in developer mode. Maybe I changed an option somewhere and 
> can't manage to find it, but perhaps it coulb be linked with the error 
> above ?
>
> Thanks for any help,
> Vincent
>
> PS : sorry if this message is duplicate, the first one sent was not on the 
> list after 24h...
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>   


-- 
ATTENTION nous avons changé de numéros de téléphones
PLEASE pay attention to our new phone numbers


Camptocamp SA
Damien Corpataux
PSE A
CH-1015 Lausanne


+41 21 619 10 22 (direct)
+41 21 619 10 10 (centrale)
+41 21 619 10 00 (fax)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20061027/fbca3e80/attachment.html


More information about the Cartoweb-users mailing list