Solved

Jquery ui dialog help

Posted on 2011-03-24
1
290 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:
Shinesh Premrajan 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Javasctipt 2 28
How to convert from xls to xlsx using java 7 42
JQuery JavaScripot loop though RadioButtonList 4 27
Diminish Pop-up  in 3 seconds 7 24
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

825 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