Okay here’s the field on my SAEF along with the code that brings up the pop-up file upload window.
Photo
<input type="text" name="photo_classified" /></td>
a href="{path=''}index.php/classifieds/file_upload_template" onclick="window.open(this.href, '_blank', 'width=400,height=600');return false;" onkeypress="this.onclick()">File Upload</a
And here’s the relevant bits of the file upload template.
{exp:file_upload:upload_form form_name="entryform" destination="Z Classified Ad Images" field_name="photo_classified" rename_duplicates="yes" return="classifieds/file_upload_placement"}
<input type='file' name='userfile' />
<input type='submit' class='submit' value='Upload' />
{/exp:file_upload:upload_form}
And here’s the file_upload_placement template (with {javascript} in the HEAD.
{exp:file_upload:upload_confirm field_replace="replace"}
<input type='submit' class='submit' value='Close Window' onclick='fileplacer();window.close();' />
{/exp:file_upload:upload_confirm}
Everything is working fine until the very end. When I “Close Window\” the window does not close, the file URL is not placed in the field in the SAEF and my home page loads in the pop-up window.
Thanks for any help!
c-
