Hi!
I'm developing a photo gallery and I have a medium-sized photo thumbnail on a page. ASPxPopupControl is attached to this image, so when a user clicks on it the popup shows up. Now, this popup shows an original photo and has Prev and Next buttons. The buttons invokes ASPxCallback.SendCallback and the callback is completed this client-side code is executed:
function callbackComplete(e)
{
if (e.result != null)
{
var args = e.result.split("|");
photoImgInPopup.SetImageUrl(args[0]);
photoImgInPopup.SetSize(args[2], args[3]);
dxPopup.SetSize(args[2], args[3]);
dxPopup.Show();
if (args[1] != -1)
currPhotoId = args[1];
}
}
Everything works (as you may see here: http://interlogus.ru/sp/Photo.aspx?id=80; Prev and Next buttons are in the popup's footer) but the original images are not the same in size and the popup needs to be recentered after the image is shown. How do I do this?
Thanks.
Alex