I have a page that uses an iframe to do an ajax style file upload. When the upload completes I’m writing a div to the iframe with the status of whether their file was uploaded or not. The iframe is not visible and I’m using as a target for the form. It all works fine except that I can’t figure out how to use jquery to get the text within the div. My iframe has an id of upload_target and the div in the iframe has the id of uploadStatus. I thought the following would work but it doesn’t. Does anyone know how I can do this? Thanks.
$("#upload_target").load(function () {
alert($("#upload_target> #uploadStatus").text());
});
Make sure your
iframehas itsnameattribute set toupload_targetas well, and then use