$(window).load inside dialog

$(window).load inside dialog


Hi guys, this is probably a stupid question, but let's see.
I have a modal dialog in which I load a php page:
$('#dialog').load('page.php', function() { show dialog });
now, on that php page I need to do some actions (actually, load the
jCrop api, which it seems can be only loaded at $(window).load time,
so that all elements are fully loaded before my actions).
It doesn't seem to work, also if I try with:
$(window).load(function() { alert("lol"); })
nothing happens, thus th question is: is there a way similar to $
(window).load to run my code after every element of the page is fully
loaded ?
Thanks,
Stefano