[Cartoweb-users] problems with the plugin search

Claire Chastagnol chastagnol.claire at wanadoo.fr
Thu Jul 31 04:00:53 EDT 2008


Hi Oliver,

I don't have the .js file included in my page, indeed. I should see all the srcipt in there?
I just have the :
<p>
  <input type="submit" value="Search" class="form_button"
           onclick="javascript: CartoWeb.trigger('Search.DoIt'); return false;"/>
     
  <input type="hidden" id="search_config" name="search_config" value="evenements"/>
  <input type="hidden" id="search_sort_column" name="search_sort_column" value="type_ev" />
  <input type="hidden" id="search_sort_direction" name="search_sort_direction" value="asc" />
  <input type="hidden" id="search_number" name="search_number" />
  <input type="hidden" id="search_page" name="search_page" />
 
 <div id="search_results_div"></div>
</p>
</fieldset>
</div>

and that's it. Why my .js file is not called?

Thank you





> Message du 31/07/08 09:47
> De : "Oliver Christen" 
> A : "Claire Chastagnol" , cartoweb-users at lists.maptools.org
> Copie à : 
> Objet : Re: [Cartoweb-users] problems with the plugin search
> 
>  
Hi
can you verify you have all the .js files included in your page ?
simply do a "view source" in your browser and search for the Search.ajax.js file.
also, you can add a simlpe "alert('test')" in the buildPostRequest function in AjaxPlugins.Search.Actions.DoIt , so you can see if that function is effectively called or not
regards
Oliver
----- Original Message ----- 
From: Claire Chastagnol 
To: cartoweb-users at lists.maptools.org 
Sent: Thursday, July 31, 2008 9:20 AM
Subject: [Cartoweb-users] problems with the plugin search

> 
> Hi everybody,
> 
> I have a new problem with an other plugin : the plugin search!!
> 
> I have loaded the plugin on the server and on the client side. I have edited the search.ini file, the search.tpl, the search_results.tpl and the search.ajax.js, like in the documentation. I have also modified the cartoclient.tpl.
> The "search" button appears in my page with the field to search in, but nothing happens when I click on the button.
> 
> What could be the problem? It seems the .js file is doing nothing, is there a problem in it??
> 
> Here are some extracts of my files:
> 
> search.tpl:
> 
> ...
> 

>   >            java-script="java-script: CartoWeb.trigger('Search.DoIt'); return false;"/>
>      
>   
>   
>   
>   
>   
>  
>   

> 
> ...
> 
> Search.ajax.je:
> AjaxPlugins.Search = {
>   
>     handleResponse: function(pluginOutput) {
>         
>         if (pluginOutput.htmlCode.evenements)
>             $('search_results_div').innerHTML = pluginOutput.htmlCode.evenements; 
>     }  
> };
> 
> /*
>  * Search plugin's Actions
>  */
>  
> AjaxPlugins.Search.Actions = {};
> AjaxPlugins.Search.Actions.DoIt = {
>     buildPostRequest: function(argObject) {
>         return AjaxHandler.buildPostRequest();
>     }
> };
> function order(column) {
>     
>     
>     if (column != $('search_sort_column').value) {
>         $('search_sort.column').value = column;
>   $('search_sort.direction').value = 'asc';
>     } else {
>   if $('search_sort.direction').value == 'asc'{
>   $('search_sort.direction').value == 'desc';
>   } else {
>    $('search_sort.direction').value = 'asc';
>    }
>   }
>   
>     CartoWeb.trigger('Search.DoIt');
> }

> 
> function recenter(id) {
>  if ($('search_config').value == 'evenements'{
>  
>   $('id_recenter_ids').value = gid;
>   $('id_recenter_layer').value = $('search_config').value; 
>     
>     
>     CartoWeb.trigger('Location.Recenter');
>  }
> }
>     function search(config) {
>     
>     $('search_config').value = config;
>     if (config == 'evenements') {
>         $('search_number').value = 10;
>     }
>     
>     CartoWeb.trigger('Search.DoIt');
>  }
>  
> 
> Thank you!!!!!!
> Claire
> 



> 
_______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080731/051fb562/attachment.html


More information about the Cartoweb-users mailing list