This goes in the cartoclient.tpl so you did it right.
 
now, when you do a query, it should fill the <div> with a table of results. It will not be displayed on your screen but you can see it if you look at the source of the page (View->Page Source in your browser)
 
So, do you see the table result in the source? You can try to temporarily remove the style="display:none;" so you can the result on your page
 
If you have a table of result, it should now activate the _javascript_ when the page load. If you look at the page source, you should find "var result = 1;"
If you see "var result = 0" then there was no result to your query and the <div> should be empty too.
 
If "var result = 1;", do you have any _javascript_ errors reported in your browser? If yes, what is the error message.
 
Oliver

I put that part into the head of the cartoclient template:

 <script language="_javascript_" type="text/_javascript_">
    <!--
  var result = "{if $tables_result|default:'0'}'1'{/if}";
  {literal}
    window.onload += function() {
      if (result == "1") {
        myContent =  document.getElementById("result").innerhtml;
        window.open('', 'popuppage',
'toolbar=no,location=no,status=no,menubar=no,resizable=yes,scrollbars=yes,co
pyhistory=no,width=300,height=400');
         popuppage.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01//EN""http://www.w3.org/TR/html4/strict.dtd ">'+
            '<html><head><title>My window</title></head><body>' + myContent
+ '</body></html>')       }
    }
    {/literal}
    //-->
  </script>

and i put these part in the body of the file

<div id="result" style="display:none;">
              {$tables_result}
 </div>

In fact I don't really know where I should put theses files except the first that has to be in the head of an html file.

_______________________________________________
Cartoweb-users mailing list
Cartoweb-users@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to