Open findborg opened 9 years ago
Hi Findborg, You can try the ajax code below.
html.ajax('components.php')
.done(function (pageContent) {
html('#myDiv').text(pageContent); // append the content to your div
}).fail(function (xhr) {
console.log(xhr.statusText); // log the error, statusText is usually used
});
Oh, I see. I could not figure out how to configure the done (function). I will give it a try.
I know that this should be very simple. But, I just can not figure out the ajax. All I am trying to do is use a link to call say buttons.php into a div on the current page called winDow. Please show me an example of this. Note\ Then I want to be able to call other pages like typo.php, components.php, etc. I figured out how to do the router which is fine. But, I want to separate the sections into other pages and just bring them in via ajax.