Solved

Jquery ui dialog help

Posted on 2011-03-24
1
279 Views
Last Modified: 2012-05-11
$('#upimage1').click(function(){
	var up = '<input id="file_upload" name="file_upload" type="file" />';
	$("#dialog1").html(up);
	
		$( "#dialog1" ).dialog({
			width: 400,
			height: 175,
			modal: true
		});
		
	$('#file_upload').uploadify({
    '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) {
			$("#dialog1").dialog('close');
	    	}
	    });		
	   }	  
  });
  
  
		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?



Thanks

0
Comment
Question by:3xtr3m3d
1 Comment
 
LVL 17

Accepted Solution

by:
shinuq earned 500 total points
ID: 35214108
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

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now