?
Solved

Jquery ui dialog help

Posted on 2011-03-24
1
Medium Priority
?
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 17

Accepted Solution

by:
Shinesh Premrajan earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Suggested Courses

770 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