I am opening a dialog window from a main window. The dialog is used to upload a file. When it is complete, I want the dialog to trigger a jQuery function in the opener window. Seems like this should work, but so far it's not.
in the main window I am opening the dialog like this:
jQuery('.modaldataupload').click(function() {
var newwindow = window.open(jQuery(this).prop('href'), '', 'height=400,width=500,top=200,left=200');
if (window.focus) {
newwindow.focus();
}
That works. The upload takes place using php, that works, and the dialog is redirected to a confirmation page that has this in it:
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#datauploadslist', window.opener.document).val('hello');
});
</script>
In the main window, I have a div:
<div id="datauploadslist"></div>
Shouldn't I get "hello" in that div?