I have a dynamically created iframe made with regular javascript. It works great when its called from a static page by regular means, but when called from a page loaded by Jquery, I get a 'myIframe is null' error.
var link = 'http://www.blah.com'
var iframe='<iframe class="adframe" id="randomnumberhere" name="widget" src="#" width="300" height="250" marginheight="0" marginwidth="0" frameborder="no" scrolling="no"></iframe>';
document.write(iframe);
var myIframe=parent.document.getElementById("randomnumberhere");
myIframe.height=250;
myIframe.width=300;
myIframe.src=link;
myIframe.style.border="0px";
myIframe.style.padding="0px";
$(function()tag, or what? You simply added the jQuery library and this doesn't work anymore?var myIframe=parent.document.getElementById("randomnumberhere");but look like you are not in a child so should bevar myIframe=document.getElementById("randomnumberhere");?