title: Script On Click Css Display Property Changes Not Working Normally Asp.net?
body: <p>i am trying to display google map on click java script changes its display property and shows google map. Its not working on IE 8 and working fine on other browsers if i do not use CSS its working fine too on IE </p>
  
  <p>my code is as under </p>
  
  <pre><code>   &lt;div class="getDirectionsBtnMain"&gt;
          &lt;a href="#" id="new-yorkiframeNav" onclick="toggle_visibility('new-yorkiframe');"&gt;
          &lt;/a&gt;
      &lt;/div&gt;
      &lt;div id="new-yorkiframe" style="background: none repeat scroll 0% 0% rgb(5, 72, 65); width: 950px; border: 10px solid rgb(5, 72, 65);" class="tab-pane vcard"&gt;
          &lt;iframe frameborder="0" style="width: 100%; height: 379px;" marginheight="0" marginwidth="0"
              src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=+40+Wall+Street,+11th+Floor+New+York,+NY+10005&amp;aq=&amp;sll=37.0625,-95.677068&amp;sspn=39.320439,86.572266&amp;t=m&amp;ie=UTF8&amp;hq=&amp;hnear=40+Wall+St,+New+York,+10005&amp;iwloc=A&amp;output=embed"&gt;
          &lt;/iframe&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>script is as,</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
          function toggle_visibility(id) {
              var e = document.getElementById(id);
  
              alert(e.style.display);
          if (e.style.display == 'block')
              e.style.display = 'none';
          else
              e.style.display = 'block';
          if (e.style.display != 'block' &amp;&amp; e.style.display != 'none')
              e.style.display = 'block';
      }
      &lt;/script&gt;
  </code></pre>
  
  <p>In CSS i am using this property,</p>
  
  <pre><code>#new-yorkiframe{display:none;}
  </code></pre>
  
  <p>First of all its not showing its Display property it is showing "null" that i alert in script it is behaving same in other browser too but after changing its property in script it show maps in other browser except IE </p>
  
  <p>but if i change its css property to,</p>
  
  <pre><code>new-yorkiframe{display:none;} 
  </code></pre>
  
  <p>its click button shows and hide map on ie as well as on other browser.</p>
  
  <p>What should i do that i want to hide map first time page load ??</p>
  
  <p>Hopes for you Cooperation </p>
  
  <p>Thanks in Advance</p>