I'm trying to load the current page into an iframe in a subset of the page via javascript. If I set the src to another page it works fine, but setting the src to location.href (or the current url specifically) renders an empty iframe. Why is this occuring, and how can I correct this?
var my_Frame=document.createElement('iframe');
my_Frame.src = location.href;
document.body.appendChild(my_Frame);