This used to work, but for some reason it doesn't anymore. I use a javascript to change the source of an iframe and then refresh it. The reason is I want to send a variable into the iframe before it is viewed.
I added som debug code, and it shows "debug 1" but not "debug 2".
What might be the issue?
$("#upload_iframe").attr("src", "/editor/upload/?dir=" + dir);
// ---------------------------------
// THESE LINES DON'T WORK - STOPS AFTER FIRST DEBUG IS RUN...
// ---------------------------------
alert('debug 1');
$("#upload_iframe").contentWindow.location.reload(true);
alert('debug 2');
// ---------------------------------
$("#upload_file").dialog('open');