As u_mulder said, you probably want to load some content on demand via AJAX request.
So when a user clicks the link, you fire of an AJAX call that gets the content you'd like to display.
It sounds to me though that you may be better off loading everything when the user gets to the page initially instead of going the AJAX route. Unless the article you want to get is hundreds of pages and has tons of images, I'd prefer the content to display immediately on page load instead of going the AJAX-route which always means a little delay on click. If the article you talk about is just text and only a couple of pages, the effect on page load time is negligible and there are tons of other things to consider first before trying to shave off a couple of bytes by not loading some text. Also keep in mind that search engines won't discover your AJAX-loaded content unless you make provisions for that.
manpreet
Best Answer
2 years ago
I'm working on a website focusing on animals that's driven by PHP and MySQL. Each species page with tentatively feature a brief introduction, followed by a series of section titles:
Classification Distribution Anatomy Diet, etc.
So imagine we visit the page MySite/Animals/Wolf. If there's an article in my database about Wolf Anatomy, then I want that somehow indicated on my page. A visitor can then click a button or link, and the article will appear under the heading Anatomy.
I'm not talking about content that's "hidden" in the html. I don't think I want to go that route, because the page should load faster if the content doesn't appear at all unless a visitor requests it.
Anyway, what's technology can I use to make content (presumably stored in a database) appear on a page when a visitor requests it?
Thank you.