user2710966
user2710966

Reputation: 17

Google Map not displaying after clicking button

I have been trying to hide Google Maps on my site (which is inside a div). I used the following in a "send" Button event called: function showPoint()

document.getElementById('GMap1').style.display = 'block';

But nothing happens when I click the send button which is suppose to execute this event.

I was able to hide the map with:

<div id="GMap1" style="height: 300px; width:300px; visibility:hidden;"  ></div> 

Only problem is displaying it.

Upvotes: 0

Views: 218

Answers (1)

Dr.Molle
Dr.Molle

Reputation: 117354

you must modify the visibility, not the display:

document.getElementById('GMap1').style.visibility= 'visible';

Upvotes: 1

Related Questions