in your html cw3tools gets initialized with "<font color="#006600"><span>fullextent" but the html doesn't contain any </span></font><span><br><<span>img</span><span> <span>id</span>="<span>fullextent_icon
</span>" ... /> and that's bad.</span></span><font color="#006600"><span></span></font><br><span><span><br>I think the toolbar.tpl code you pasted doesn't get called because it should actually render<br>
</span></span><span><<span>img</span><span> <span>id</span>="<span>fullextent_icon
</span>" ... /> so find out why and this should solve the problem.<br><br></span></span><br><div><span class="gmail_quote">
On 9/26/07, <b class="gmail_sendername">Milo van der Linden</b> <<a href="mailto:mlinden@zeelandnet.nl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mlinden@zeelandnet.nl</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
My live site is here: <br>
<br>
<a href="http://cartoweb.bosqom.nl/cartoweb34/htdocs/index.php" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://cartoweb.bosqom.nl/cartoweb34/htdocs/index.php</a><br>
<br>
It is a custom template (nice looking, but not working to well) that I
got from a guy before me. The Firebug tip was Awesome!!!!! That is a
really nice tool! WAY better then the java debug console I was using.<br>
<br>
I can see that a lot of strange things happen on the buttons:<br>
<br>
- All this Element.hide scripts on the buttons; are they wise?<br>
- My pdfrotate.gif is that folder is 1x1 pixel, can that be the problem?<br>
<br>
<br>
In my custom toolbar.tpl is: <br>
<br>
<font color="#ff6600"> {if $tool->id ==
fullextent}<br>
{* ranzige code, ophalen uit ini bestand *}<br>
<input type="hidden" name="recenter_none"
value="-84400, 304000, 367000, 621000"/><br>
&nbsp;&nbsp;&nbsp;<a
href=<a>"javascript:document.carto_form.recenter_none.name='recenter_bbox';doSubmit();"</a>><img
type="image" id="{$tool->id}_icon" name="{$tool->id}" src="{r
type=gfx/toolnew}{$tool->id}.gif{/r}" height="28" width="28"
onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');{if
$group != 5}Element.hide('querylayer');{/if}"
onMouseOver="updateTooltip('b_{$tool->id}')"
onMouseOut="updateTooltip()"></a>&nbsp;&nbsp;&nbsp;<br>
{else}<br>
&nbsp;&nbsp;&nbsp;<img
type="image" id="{$tool->id}_icon" name="{$tool->id}" src="{r
type=gfx/toolnew}{$tool->id}.gif{/r}" height="28" width="28"
onclick="Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');{if
$group !=
5}Element.hide('querylayer');{/if}mainmap.{$tool->id}('map');"
onMouseOver="updateTooltip('b_{$tool->id}')"
onMouseOut="updateTooltip()">&nbsp;&nbsp;&nbsp;<br>
{/if}<br>
</font><br>
<br>
resulting in<br>
<br>
<font color="#006600"><span>cw3_tools = new
Array("zoomin","zoomout","pan","fullextent","query_by_point","query_by_bbox","query_by_polygon","query_by_circle","outline_point","outline_line","outline_rectangle","outline_poly","pdfrotate");
</span></font>
<div><font color="#006600"><span>3</span><span> var cw3_initial_selected_tool =
"mainmap.zoomin('map');";</span></font></div>
<div><font color="#006600"><span>4</span><span></span></font></div>
<div><font color="#006600"><span>5</span><span> cw3_initial_selected_tool +=
"setActiveToolButton('zoomin');";</span></font></div>
<div><font color="#006600"><span>6</span></font><span><font color="#006600"> var toolbar_rendering =
'outline';<br>
</font><br>
</span></div>
<br>
<br>
<br>
<br>
<div><span></<span>script</span>></span></div>
<div>
<div><span><<span>input</span><span> <span>id</span>="<span>tool</span>"</span><span> <span>type</span>="<span>hidden</span>"</span><span> <span>value</span>="<span>zoomin</span>"</span><span>
<span>name</span>="<span>tool</span>"</span><span>/></span></span></div>
</div>
<div>
<div><span><<span>img</span><span> <span>id</span>="<span>zoomin_icon</span>"</span><span> <span>class</span>="<span>toolbar_off</span>"</span><span> <span>width</span>="<span>28</span>"</span>
<span> <span>height</span>="<span>28</span>"</span><span> <span>onmouseout</span>="<span>updateTooltip()</span>"</span><span> <span>onmouseover</span>="<span>updateTooltip('b_zoomin')</span>
"</span><span> <span>src</span>="<span>webGIS/gfx/toolnew/zoomin.gif</span>"</span><span> <span>onclick</span>="<span>Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.zoomin('map');setActiveToolButton('zoomin');
</span>"</span><span>/></span></span></div>
</div>
<div>
<div><span><<span>img</span><span> <span>id</span>="<span>zoomout_icon</span>"</span><span> <span>class</span>="<span>toolbar_on</span>"</span><span> <span>width</span>="<span>28</span>"</span>
<span> <span>height</span>="<span>28</span>"</span><span> <span>onmouseout</span>="<span>updateTooltip()</span>"</span><span> <span>onmouseover</span>="<span>updateTooltip('b_zoomout')</span>
"</span><span> <span>src</span>="<span>webGIS/gfx/toolnew/zoomout.gif</span>"</span><span> <span>onclick</span>="<span>Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.zoomout('map');setActiveToolButton('zoomout');
</span>"</span><span>/></span></span></div>
</div>
<div>
<div><span><<span>img</span><span> <span>id</span>="<span>pan_icon</span>"</span><span> <span>class</span>="<span>toolbar_off</span>"</span><span> <span>width</span>="<span>28</span>"</span>
<span> <span>height</span>="<span>28</span>"</span><span> <span>onmouseout</span>="<span>updateTooltip()</span>"</span><span> <span>onmouseover</span>="<span>updateTooltip('b_pan')</span>
"
</span><span> <span>src</span>="<span>webGIS/gfx/toolnew/pan.gif</span>"</span><span> <span>onclick</span>="<span>Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.pan('map');setActiveToolButton('pan');
</span>"</span><span>/></span></span></div>
</div>
<div>
<div><span><<span>img</span><span> <span>id</span>="<span>query_by_point_icon</span>"</span><span> <span>class</span>="<span>toolbar_off</span>"</span><span> <span>width</span>="<span>28</span>
"</span><span> <span>height</span>="<span>28</span>"</span><span> <span>onmouseout</span>="<span>updateTooltip()</span>"</span><span> <span>onmouseover</span>="<span>updateTooltip('b_query_by_point')
</span>"</span><span> <span>src</span>="<span>webGIS/gfx/toolnew/query_by_point.gif</span>"</span><span> <span>onclick</span>="<span>Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.query_by_point('map');setActiveToolButton('query_by_point');
</span>"</span><span>/></span></span></div>
</div>
<div>
<div><span><<span>img</span><span> <span>id</span>="<span>query_by_bbox_icon</span>"</span><span> <span>class</span>="<span>toolbar_off</span>"</span><span> <span>width</span>="<span>28</span>
"</span><span> <span>height</span>="<span>28</span>"</span><span> <span>onmouseout</span>="<span>updateTooltip()</span>"</span><span> <span>onmouseover</span>="<span>updateTooltip('b_query_by_bbox')
</span>"</span><span> <span>src</span>="<span>webGIS/gfx/toolnew/query_by_bbox.gif</span>"</span><span> <span>onclick</span>="<span>Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.query_by_bbox('map');setActiveToolButton('query_by_bbox');
</span>"</span><span>/></span></span></div>
</div>
<div>
<div><span><<span>img</span><span> <span>id</span>="<span>query_by_polygon_icon</span>"</span><span> <span>class</span>="<span>toolbar_off</span>"</span><span> <span>width</span>="<span>28</span>
"</span><span> <span>height</span>="<span>28</span>"</span><span> <span>onmouseout</span>="<span>updateTooltip()</span>"</span><span> <span>onmouseover</span>="<span>updateTooltip('b_query_by_polygon')
</span>"</span><span> <span>src</span>="<span>webGIS/gfx/toolnew/query_by_polygon.gif</span>"</span><span> <span>onclick</span>="<span>Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.query_by_polygon('map');setActiveToolButton('query_by_polygon');
</span>"</span><span>/></span></span></div>
</div>
<div>
<div><span><<span>img</span><span> <span>id</span>="<span>query_by_circle_icon</span>"</span><span> <span>class</span>="<span>toolbar_off</span>"</span><span> <span>width</span>="<span>28</span>
"</span><span> <span>height</span>="<span>28</span>"</span><span> <span>onmouseout</span>="<span>updateTooltip()</span>"</span><span> <span>onmouseover</span>="<span>updateTooltip('b_query_by_circle')
</span>"</span><span> <span>src</span>="<span>webGIS/gfx/toolnew/query_by_circle.gif</span>"</span><span> <span>onclick</span>="<span>Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.query_by_circle('map');setActiveToolButton('query_by_circle');
</span>"</span><span>/></span></span></div>
</div>
<div>
<div><span><<span>img</span><span> <span>id</span>="<span>pdfrotate_icon</span>"</span><span> <span>class</span>="<span>toolbar_off</span>"</span><span> <span>width</span>="<span>28</span>"
</span><span> <span>height</span>="<span>28</span>"</span><span> <span>onmouseout</span>="<span>updateTooltip()</span>"</span><span> <span>onmouseover</span>="<span>updateTooltip('b_pdfrotate')
</span>"</span><span> <span>src</span>="<span>webGIS/gfx/toolnew/pdfrotate.gif</span>"</span><span> <span>onclick</span>="<span>Element.hide('importlayer');Element.hide('saveaslayer');Element.hide('layerorderlayer');Element.hide('advisorlayer');Element.hide('printlayer');Element.hide('viewslayer');Element.hide('querylayer');mainmap.pdfrotate('map');setActiveToolButton('pdfrotate');
</span>"</span><span>/></span></span></div>
</div>
<div><span></<span>span</span>><br>
<br>
Doesn't look like what you where telling me, can I replace the array<br>
</span></div>
<br>
<br>
<br>
<br>
<br>
Loic Devaux schreef:
<div><span><blockquote type="cite">This happened to me too when I disabled some tool in
toolbar.tpl instead of disabling it with a negative weight in the ini
file .<br>
<br>
var elt = xGetElementById(cw3_tools[i] + '_icon');<br>
if(elt == null) return;
<br>
<br>
in setActiveToolButton function in carto.js couldn't find the
"cw3_tools[i] + '_icon'" element so the loop breaked and the active
tool stayed on zoomin.<br>
<br>
Maybe you can check "cw3_tools = new Array" in the rendered html to
find out which tool causes the problem or make step by step debug with
firebug.
<br>
<br>
Loïc<br>
<br>
<div><span class="gmail_quote">On 9/26/07, <b class="gmail_sendername">Milo van der Linden</b> <<a href="mailto:mlinden@zeelandnet.nl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mlinden@zeelandnet.nl
</a>>
wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"><font face="Helvetica, Arial, sans-serif">Hello list,<br>
<br>
I am having a small problem. My Cartoweb keeps zooming in, even when it
should zoom out.<br>
<br>
Any idea?<br>
</font>
<div>-- <br>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="400">
<tbody>
<tr>
<td rowspan="3" align="left" height="0" valign="bottom" width="15"><br>
</td>
<td colspan="2" align="left" height="78" valign="top" width="0">
<p>Milo van der Linden <br>
<a>skype: milovanderlinden</a><br>
<a href="mailto:mlinden@zeelandnet.nl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mlinden@zeelandnet.nl</a><br>
<a href="mailto:milovanderlinden@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">milovanderlinden@gmail.com</a><br>
<a href="mailto:milo@3dsite.nl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">milo@3dsite.nl</a><br>
<a href="http://www.3dsite.nl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.3dsite.nl</a><br>
</p>
</td>
<td rowspan="3" align="left" height="0" valign="top" width="15"> </td>
<td valign="top" width="300">
<p><span lang="NL">De informatie in dit bericht
reflecteert mijn persoonlijke mening en niet die van een bedrijf of
instantie. Aan de informatie kunnen geen rechten worden ontleend.
Indien dit bericht onderdeel is van een forum, mailing-list of
community dan gelden automatisch de bij het betreffende medium
behorende voorwaarden.</span> <span lang="EN">The information in this
message reflects my
personal opinion and not that of a company or public body. All rights
reserved.If this message is contained in a mailing-list or community,
the rights on the medium are automatically adapted.</span></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
_______________________________________________<br>
Cartoweb-users mailing list<br>
<a href="mailto:Cartoweb-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Cartoweb-users@lists.maptools.org
</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/cartoweb-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.maptools.org/mailman/listinfo/cartoweb-users</a><br>
<br>
</blockquote>
</div>
<br>
</blockquote>
<br>
<br>
<div>-- <br>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="400">
<tbody>
<tr>
<td rowspan="3" align="left" height="0" valign="bottom" width="15"><br>
</td>
<td colspan="2" align="left" height="78" valign="top" width="0">
<p>Milo van der Linden
<br>
<a>skype: milovanderlinden</a><br>
<a href="mailto:mlinden@zeelandnet.nl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mlinden@zeelandnet.nl</a><br>
<a href="mailto:milovanderlinden@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">milovanderlinden@gmail.com</a><br>
<a href="mailto:milo@3dsite.nl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">milo@3dsite.nl</a><br>
<a href="http://www.3dsite.nl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.3dsite.nl</a><br>
</p>
</td>
<td rowspan="3" align="left" height="0" valign="top" width="15"> </td>
<td valign="top" width="300">
<p><span lang="NL">De informatie in dit bericht
reflecteert mijn persoonlijke mening en niet die van een bedrijf of
instantie. Aan de informatie kunnen geen rechten worden ontleend.
Indien dit bericht onderdeel is van een forum, mailing-list of
community dan gelden automatisch de bij het betreffende medium
behorende voorwaarden.</span>
<span lang="EN">The information in this message reflects my
personal opinion and not that of a company or public body. All rights
reserved.If this message is contained in a mailing-list or community,
the rights on the medium are automatically adapted.</span></p>
</td>
</tr>
</tbody>
</table>
</div>
</span></div></div>
</blockquote></div><br>