Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8102331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:13:01+00:00 2026-06-05T23:13:01+00:00

I need someone to lead/guide me where have I code wrongly because I can’t

  • 0

I need someone to lead/guide me where have I code wrongly because I can’t figure out where had gone wrong in my code. This code working fine in my IE and also FF but not in Chrome or Safari. By right, when I clicked on the dropdownlist selection it will show the exact map of the selected location. But in my Chrome and Safari, it only showed the initial map rather than showing the selected location from the list.

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Google Maps JavaScript API Example</title>

  <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyAn5fGcWgolNQy8U9PV2YsP1P3Knn23Jro&sensor=false"></script>
  <script type="text/javascript">
    // Variables Initialize
    var marker;
    var map;
    var image = "flag.png";
    function initialize(lat,lng) {
      var singapore = new google.maps.LatLng(lat,lng);
      var settings = {
        zoom: 11,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        center: singapore,  
        mapTypeControl: true,
        mapTypeControlOptions: {
            style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
            position: google.maps.ControlPosition.TOP_RIGHT},
        navigationControl: true,
        navigationControlOptions: {
            style: google.maps.NavigationControlStyle.SMALL},
        panControl: true,    
        panControlOptions: {
            position: google.maps.ControlPosition.RIGHT_TOP},
        zoomControl: true,
        zoomControlOptions: {
            style: google.maps.ZoomControlStyle.DEFAULT,
            position: google.maps.ControlPosition.LEFT_TOP},
        scaleControl: true,    
        scaleControlOptions: {
            position: google.maps.ControlPosition.BOTTOM_RIGHT}
      };
      map = new google.maps.Map(document.getElementById("map_canvas"), settings);
      marker = new google.maps.Marker({
          map: map,
          draggable:false,
          animation: google.maps.Animation.DROP,
          position: singapore,
          title:"Singapore",
          icon: image
      });
    }
  </script>
  </head>
  <body onload="initialize('1.28563','103.80918')" onunload="GUnload()">
    <select>
        <option onclick="initialize('1.28563','103.80918')">--Select Location--</option>
        <option onclick="initialize('1.28527','103.82682')">Blk 18A Jalan Membina</option>
        <option onclick="initialize('1.28277','103.82562')">Blk 26 Jalan Membina</option>        
        <option onclick="initialize('1.31546','103.766363')">Blk 321-326 Clementi Ave 5</option>
    </select>
    <div id="map_canvas" style="width: 500px; height: 300px"></div>
  </body>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:13:03+00:00Added an answer on June 5, 2026 at 11:13 pm

    Adding onclick to an <option> doesn’t seem like a great idea; I would instead use the onchange on the <select> and use the value attribute to store the lat/lng instead:

    <select onchange="movemap(this)">
        <option value="1.28563,103.80918">Blk 18a Jln Membina</option>
        ...
    
    function movemap(sel)
    {
        var opt = sel.options[sel.selectedIndex],
        vals = opt.value.split(',');
    
        initialize(vals[0], vals[1]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need someone who can tell me what I'm missing. I have this scalar
I need someone to back me up, or prove me wrong, in regard to
I think I just need someone to show me the obvious. I have a
Can someone please explain what really goes on in this code ? If I
I am trying to find the position of Test3 in jquery can someone lead
I need someone to help point out the obvious to me...been looking for hours
Hello:) I need someone to translate this little bash script to C because now
I need someone help. When I open https://developers.facebook.com/docs/reference/api/ and clicked https://graph.facebook.com/me/likes?access_token=blablabla , I got
Please need someone's expertise on my link; http://360webmedia.com/Store/development/index.html In my my menu_left.jpg is displaying
I need someone to explain the following names; Asynchronous Delegates. Asynchronous methods. Asynchronous events.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.