Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

131
Vistas
Jump menu with onclick function

I want to integrate a link with an onclick event to a function like <a href="#" onclick="fireMarker(1);">Map Marker URL 1</a> and <a href="#" onclick="fireMarker(2);">Map Marker URL 2</a> into a jump menu like

<select id="selectbox" name="" onchange="javascript:location.href = this.value;">
    <option value="https://www.yahoo.com/" selected>Option1</option>
    <option value="https://www.google.co.in/">Option2</option>
    <option value="https://www.gmail.com/">Option3</option>

</select>

OR

<select onchange="fireMarker(this);">
    <option value="15">1</option>
    <option value="16">2</option>
    <option value="18">3</option>
</select>

The fireMarker function is:

 function fireMarker(id){
                    google.maps.event.trigger(markers[id], 'click');
                    markers[id].setAnimation(google.maps.Animation.DROP);
                    markers[id].setVisible(true);
                    }

When I click an option I want it to execute urls in the format Map Marker URL. I hope to have multiple jump menus on same page Thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Replace onchange="fireMarker(this); with onchange="fireMarker(value)"

like:

<html>
<head>  
<script type="text/javascript">
    function fireMarker(id) {
        google.maps.event.trigger(markers[id], 'click');
        markers[id].setAnimation(google.maps.Animation.DROP);
        markers[id].setVisible(true);
   }
</script>
</head>
<body>
    <select onchange="fireMarker(value)">
        <option value="15">1</option>
        <option value="16">2</option>
        <option value="18">3</option>
    </select>
</body>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda