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

  • SEARCH
  • Home
  • 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 9060781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:19:04+00:00 2026-06-16T15:19:04+00:00

I’m trying to display google map, with a form beside it in another div

  • 0

I’m trying to display google map, with a form beside it in another div element.

The code is working perfectly with Firefox and Chrome but in IE 8 it doesn’t show Google map.

<html>
<head>
<script type ="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script src="http://code.jquery.com/jquery-1.8.3.min.js" type="text/javascript"></script>
<style type="text/css">

body{
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
height:100%;
}
p, h1, form, button{border:0; margin:0; padding:0;}

.spacer{clear:both; height:1px;}
/* ----------- My Form ----------- */
.myform{
margin:0 auto;
width:350px;
padding:6px;
}

/* ----------- stylized ----------- */
#stylized{
border:solid 2px #b7ddf2;
background:#ebf4fb;
}
#stylized h1 {
font-size:14px;
font-weight:bold;
margin-bottom:8px;
}
#stylized p{
font-size:11px;
color:#666666;
margin-bottom:20px;
border-bottom:solid 1px #b7ddf2;
padding-bottom:10px;
}
#stylized label{
display:block;
font-weight:bold;
text-align:right;
width:120px;
float:left;
}
#stylized .small{
color:#666666;
display:block;
font-size:11px;
font-weight:normal;
text-align:right;
width:120px;
}
#stylized select{
float:left;
font-size:12px;
padding:4px 2px;
border:solid 1px #aacfe4;
width:180px;
margin:2px 0 20px 10px;
}
#stylized input{
float:left;
font-size:12px;
padding:4px 2px;
border:solid 1px #aacfe4;
width:180px;
margin:2px 0 20px 10px;
}
#stylized button{
clear:both;
margin-left:120px;
width:120px;
height:31px;
background:#666666 url(img/button.png) no-repeat;
text-align:center;
line-height:31px;
color:#FFFFFF;
font-size:11px;
font-weight:bold;
}
</style>
<script type="text/javascript">
      var myMap, myCenter, myVessel, myInfo;
      var markers = new Array();
      var temperatureData = new Array();
      var current = 0;


/*      window.createMap = function () {
         DoCreateMap();
         window.showMap();
      };

      window.showMap = function () {
         google.maps.event.trigger(myMap, 'resize');
         myMap.setCenter(myCenter);
         myInfo.open(myMap, myVessel);
      };

      $(document).ready(function () {
         if (null == myMap) {
            var s = document.createElement("script");
            s.type = "text/javascript";
            s.src = "https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=true&callback=createMap";
      $("head").append(s);
      } else {
            window.showMap();
      }
      });
*/
      function DoCreateMap() {
        myCenter = new google.maps.LatLng(52.381450, 4.663004);
        //myCenter = new google.maps.LatLng(9.1105671, -79.695602);
        var myOptions = {zoom: 5,
                        center: myCenter,
                        mapTypeId: google.maps.MapTypeId.ROADMAP
                        }
        myMap = new google.maps.Map(document.getElementById("vesselmap"), myOptions);
      }


   </script>
</head>
<body onload="DoCreateMap();">
<div id="container" style="overflow:hidden;width:100%;height:75%;">
  <div id="inner" style="overflow:hidden;width:100%;">
     <div id="vesselmap" style="float:left;width:70%;height:75%;display:block;">
     </div>
     <div style="float:left;width:30%;height:75%;">
        <div id="stylized" class="myform">
            <h1>Route with Temperature</h1>
            <p>See Maximum and Minimum Temperature on a route.</p>
            <label>Source Port
            <span class="small">Select Starting Port</span>
            </label>
            <select name="source_port" id="source_port">
                <option value="Rotterdam, Netherland">Rotterdam, Netherland</option>
            </select>
            <label>Destination Port
            <span class="small">Select Destination Port</span>
            </label>
            <select name="dest_port" id="dest_port">
                <option value="Bangkok, Thailand">Bangkok, Thailand</option>
            </select>
            <label>Date
            <span class="small">Select Date of Journey</span>
            </label>
            <input type="text" id="datepicker" />
            <button type="submit" id="submit">See Route</button>
        </div>
     </div>
</div>
</div>

</body>
</html>

I am not getting any javascript error. I even validated the CSS and got no issue there.
Please help.

  • 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-16T15:19:06+00:00Added an answer on June 16, 2026 at 3:19 pm

    That is because you gave a height:75% to your map div but its parent <div id="inner" doesn’t have a height attribute.

    Give a height value to your div id='inner' (% or px) and it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm trying to select an H1 element which is the second-child in its group
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am confused How to use looping for Json response Array in another Array.
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.
In my XML file chapters tag has more chapter tag.i need to display chapters

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.