Hi all, i am calling the function given below on dropping a tag on an area. If that tag drops successfully it should append an image and on double click it should produce a dialog box.This happens for the first time when i drop a tag but does not work when i drop that second time.
function dropFile()
{
$(".File_div").draggable({
helper:'clone',
revert: 'invalid'
});
var tag="#Normal_Tag1_div_dummy1";
$(Normal_Tag1_div_dummy1).droppable({
drop: function(ev,ui) { alert('dropped');
//accept: ".File_div"
var dropped = ui.draggable;
alert(dropped);
var file_img_src=document.getElementById('file_img').src;
var image='<img id="file_img'+count+'" class ="file_img" name="file_img" src='+file_img_src+" />"
$(image).appendTo(this).dblclick(
function(event){
alert("1");
window.event.cancelBubble = true;
//var jsmarty=WMCreateSmartyObject();
//var test_tpl= WMSmartyFetch(jsmarty, 'dialog.tpl');
//document.getElementById('test').innerHTML=test_tpl;
//dialogtest();
$("#dialog1").dialog(
{
/* buttons:
{
"Upload file": function(){
},
Cancel: function() {
$(this).dialog('close');
}
},*/
close: function() {
}
});
alert("2");
});
}
});
count++;
}