allora, questa è la stranezza:
se chiamo editfunction ho il problema, se chiamo newfunction dallo stesso imagebutton, la modal si apre
di seguito il codice
codice:
function editfunction(obj) {
var url = "editPhotoGalleryImage.aspx?id=" + obj;
var dialog = $('<iframe src="' + url + '" frameborder="0"></iframe>').appendTo('body');
dialog.dialog({ modal: true, minHeight: 570, minWidth: 400, show: "blind",
hide: "explode", open: function (type, data) { $(this).parent().appendTo("form"); },
close: function (event, ui) { window.location.reload(); }
});
return false;
};
function newfunction() {
var querystring = location.search;
var url = "insertPhotoGalleryImage.aspx" + querystring;
var dialog = $('<iframe src="' + url + '" frameborder="0"></iframe>').appendTo('body');
dialog.dialog({ modal: true, minHeight: 570, minWidth: 400, show: "blind",
hide: "explode", open: function (type, data) { $(this).parent().appendTo("form"); },
close: function(event, ui) { window.location.reload(); }
});
return false;
};
...
<asp:ImageButton ID="ImageButton1" ImageUrl="images/edit.gif" CausesValidation="false" onClientClick='return editfunction(<%#Eval("idphotoimage")%>' runat="server" />
Non capisco dove sbaglio..