Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!