Jquery ui dialog help

	var up = '<input id="file_upload" name="file_upload" type="file" />';
		$( "#dialog1" ).dialog({
			width: 400,
			height: 175,
			modal: true
    'uploader'  : 'uploadengine/uploadify.swf',
    'script'    : 'uploadengine/uploadify.php',
    'cancelImg' : 'uploadengine/cancel.png',
    'folder'    : 'uploadengine/uploads',
	'removeCompleted' : false,
	'sizeLimit'   : 2097152,
    'auto'      : true,
	'onComplete'  : function(event, ID, fileObj, response, data) {
		return false;

Open in new window

<div id="dialog1" title="Image Upload" style="display:none;"> </div>

im trying to integrate uploadify plugin into a uidialog everytime dialog opens uploadify content repeating. any idea how to reset after dialog close?


Who is Participating?
Shinesh PremrajanConnect With a Mentor Engineering ManagerCommented:
It seems the code for this

var up = '<input id="file_upload" name="file_upload" type="file" />';
$('#dialog1').empty().html(up) ;

Is adding up repeatedly. u need to reset the HTML contents before uploading.

Hope this helps

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.