There's only one page involved here. When you call
$('#dialog').load('page.php', function() { ... });it goes out and gets the contents of page.php and puts them in the #dialog element, but that's part of the same page it's on. Since there's no iframe, there's not a different document or window or load. I only clarify since you said "now, on that php page I need to do some actions". The callback function above, passed as the final argument to .load() is your equivalent to $(window).load(fn). At that point the content from page.php has been loaded into #dialog and is ready to be manipulated. - Richard On Thu, Aug 6, 2009 at 6:22 AM, Stefano <[email protected]> wrote: > > 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 > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
