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
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to