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@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: ... <p> <input type="submit" value="{t}Search{/t}" 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> ... 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@lists.maptools.org http://lists.maptools.org/mailman/listinfo/cartoweb-users
_______________________________________________ Cartoweb-users mailing list Cartoweb-users@lists.maptools.org http://lists.maptools.org/mailman/listinfo/cartoweb-users