Question

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.

Was it helpful?

Solution

you must modify the visibility, not the display:

document.getElementById('GMap1').style.visibility= 'visible';
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top