[From nobody Thu Mar 23 13:35:38 2006 Message-ID: <4422EA50.4040009@camptocamp.com> Date: Thu, 23 Mar 2006 19:34:56 +0100 From: Pierre GIRAUD <pierre.giraud@camptocamp.com> User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: giuseppe.derossi@email.it Subject: Re: [Cartoweb-users] box with a vertical scroll bar References: <7f87732f503c8951492b6b8968041a7a@164.129.1.39> In-Reply-To: <7f87732f503c8951492b6b8968041a7a@164.129.1.39> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit My first thougt is that you include a script tag into another one. Try this instead. <script language="JavaScript" type="text/javascript"> <!-- {literal} function Jumper(select) { document.location.href = select.options[select.selectedIndex].value; } {/literal} //--> </script> I'm not sure this will correct your bug. If not, send the generated html code. Regards Pierre GIRAUD giuseppe.derossi@email.it wrote: >Hi guys, >I'd like to add a little box with a vertical scroll bar in order to display >the >results of a query of mine: in this way I don't waste to much space. The >results are links which can be pushed to recenter the map. >I'm trying to adapt the following code: ><HTML> > <HEAD> > <TITLE>Dynamic HTML - Menu </TITLE> > > <SCRIPT language="JavaScript"> > function Jumper(select) { > document.location.href = select.options[select.selectedIndex].value; > } > </SCRIPT> > </HEAD> > > <BODY> > > <FORM id="frmJumper"> > <SELECT id="selMenu" multiple size="4"> > <OPTION value="http://www.google.it" selected >Google > <OPTION value="http://www.email.it" selected >Email > <OPTION value="http://www.google.it" selected >[ Link ] > <OPTION value="http://www.email.it" selected >Email > <OPTION value="http://www.google.it" selected >Google > <OPTION value="http://www.email.it" selected >Email > </SELECT> > <br> > <br> > <INPUT type="button" value="VAI" >onclick="JavaScript:Jumper(frmJumper.selMenu)"> > </FORM> > > </BODY> > ></HTML> > >First, I wrote the function script in cartoclient.tmp just before the >closing head tag: > ><script language="JavaScript" type="text/javascript"> > <!-- > {literal} > <SCRIPT language="JavaScript"> > function Jumper(select) { > document.location.href = select.options[select.selectedIndex].value; > } > </SCRIPT> > {/literal} > //--> > </script> > >In my second attempt, I wrote the function in carto.js file of my project >before compiling it. > >The second piece of code has been written in myPlugIn.tmp: > > <FORM id="frmJumper"> > <SELECT id="selMenu" multiple size="4"> > ://www.google.itGoogle > {foreach name=ciclo from=$coordinate item=xp1 } > > <OPTION value="{$xp1}" selected > Result n. >{$smarty.foreach.ciclo.iteration} > <br> > > {/foreach} > </SELECT> > <br> > <br> > <INPUT type="button" value="VAI" >onclick="JavaScript:Jumper(frmJumper.selMenu)"> > </FORM> > >In $xp1 there is something like >http:\\mysitepathmyproject.php?recenter_bbox=x1,x2,y2,y2. > >The box is displayed and, in the html file, the code seems to be ok, but >when >I click on the links, nothing happens. I see the javascript error : >"previsto oggetto" that is, there isn't the object and the function is not >recalled. > >Can you help me ? is there a right way to get what I want ? > >Tnk in advantage. > >Giu > > > > > -- > Email.it, the professional e-mail, gratis per te: http://www.email.it/f > > Sponsor: > Per il tuo progetto da realizzare, Findomestic ti offre finanziamenti >chiari e semplici senza anticipi, clicca e scopri come! > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3938&d=20060323 > > -- > Email.it, the professional e-mail, gratis per te: http://www.email.it/f > > Sponsor: > Trova subito il tuo volo scontato su Opodo! > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=4939&d=20060323 > > >_______________________________________________ >Cartoweb-users mailing list >Cartoweb-users@lists.maptools.org >http://lists.maptools.org/mailman/listinfo/cartoweb-users > > ]