Reputation: 83
i built a website where my frame, with the main menue and the banner, is always exisiting.
I created a div element, in which i can load everything i want dynamically.
But now i have a problem. If somebody clicks a link, i want to load a html document into my div-frame. When this has been done, a another html document should be loaded into a part of the new loaded html document.
The rask is now, to check when the first div element has been loaded and load something into this element.
An Example:
$("#examplelink").click(function()
{
$("#mainsite").load("firstlowerside.html");
$("#firstlowerside_div").load("secondlowerside.html");
});
Javascript is ignoring the command line: $("#firstlowerside_div").load("secondlowerside.html") , because the "firstlowerside.html" isnt already exisiting at this thime.
Can somebody tell my how i can check is the document has been loaded into my div and start executing the second command after this?
Upvotes: 2
Views: 161