javascript - jquery getscript for iframe object -


I have a dynamically created iframe, which I am trying to add to the script. For example:

var iframe = document.createElement ("iframe");

I want to inject javascript in this iframe. I have found this work without using jquery by creating a script element under the iframe object and by preparing callback on this script object & amp; OnReadyState events now I want to try the same thing with jquery.

However if I do just:

  $ GetScript (url, function () {myCallback ();});  

My documents (scripts) are added to the current document, and the references related to the iframe object are broken. How can I call iscript to an iframe object?

tried this which did not work:

  var elementID = $ (element) .attr ('id'); $ ('Iframe #' + elementID) .getScript (url, function () {myCallback ();});  

The only way .getScript will work if you want to Jquery Automatically adds script to download and existing document

because it performs on iframe

Comments

Popular posts from this blog

iphone - How do I make a UIPickerView in a UIActionSheet -

excel - Populate list via a bi-Condition -