I've got a file upload script working with an iframe so the page doesn't have to reload.
I've run into an issue concerning retrieving data from the iframe when it's loaded using jQuery's .live()
event, like this:
$("iframe").live("load", function() {
console.log($(this).contents().find("body").html());
});
This event doesn't even fire (I get nothing in Firebug), so how can I go about getting the HTML of an iframe after it's loaded some content from my file upload script? I want to do this so I can get the return state of the PHP script run on the server.
I have to use .live()
as these elements are dynamically added, meaning the traditional .load()
won't work.