Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Technology & Software 2 years ago
Posted on 16 Aug 2022, this text provides information on Technology & Software related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
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.
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.
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.