I successfully changed the source of an iframe
by writing a jQuery script on $(document.ready())
to change the src
attribute from "http://tobechangedurl.com"
to "http://newurl.com"
Below is the iframe
element:
<p><iframe width="748" height="475" frameborder="0" src="http://tobechangedurl.com" style="margin-left: 50px;"></iframe></p>
and it works fine. But, I would like to know when exactly a document.ready
function gets triggered, there was a time when I was doubting the change will not work as I was thinking the iframe
will load the tobechangedurl and then the script will change the src
to newurl.