title: Why am i getting 500 (Internal Server Error) when settting new src for iframe dynamically?
body: <p>I have a map that indicates the current user's location..that works..but only sometimes and I don't know why. I sometimes get the error "500 (Internal Server Error)" but when I visit the map.php directly then it works fine.</p>
  
  <p>this is my HTML</p>
  
  <pre><code>&lt;iframe  id="iframe_map" frameBorder="0"  scrolling="no" width="100%" height="200px" src=""&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>this is the javascript</p>
  
  <pre><code>$(document).ready (function(){
  
    //assume I have some code that gets the users current location
  
    //here I send the latitude and longitude as parameters to the map.php page
    //I then give my iframe a new map with new coordinates and render on HTML page
  
    $('#iframe_map').fadeOut(3000,function(){
      $('#iframe_map').attr('src',"map.php?lat="+position.coords.latitude+"&amp;lon="+position.coords.longitude);            
      $('#iframe_map').fadeIn(3500);
    });
  });
  </code></pre>