Note that there are some explanatory texts on larger screens.

plurals
  1. POhow can I force a php include to load AFTER the rest of the page has loaded?
    primarykey
    data
    text
    <p>So I've determined I'm in a bit over my head. I'm very new to any code past html and css and I decided to delve into javascript as my first attempt. I've received a lot of great feedback and while a lot of it has helped so has really been over my head.</p> <p>In essence what I've done is made a gallery out of two php pages: the first is a page on my site with a sliding thumbnail window and a 'generic' field that will load the artwork and variable content. The second is a gallery.php page that has all of the potential artwork broken out into divs with the art, titles, descriptions, etc. all broken out with unique ids. When one of the thumbnails is selected, it calls the div from the gallery.php page and populates it in the 'generic' div using .innerHTML. This has worked fine but since I've got 40+ divs in the gallery.php page, making it a standard php include (in a hidden div so nothings visible) make the page take forever to load and that's not ideal.</p> <p>Since I'm really new to everything I'm starting out really slow, and avoiding jquery solely as I'm trying to grasp it's javascript roots first. I posed this issue the other day when I found the .load() function in jquery and I was wondering if there was a way to write that out in straight javascript and while I didn't received any version of that specifically I did get a detailed reply on how to do it in ajax which was a bit over my head.</p> <p>My inquiry essentially is one of the following scenarios possible: - Hopefully the easiest solution... is there a way load all the content on the page and then only AFTER the page is loaded tell the page to start loading the included gallery.php page's content so that I don't slow down the page's load time and if anything just slow the load time of my gallery's content when clicked? - Is AJAX the most basic way of calling the div from another page? - If there is a way to define the source as a separate php page, can I tell it to pull the div I define? - If I were to fold and include the .load() jquery function how do I return the div I'm looking for?</p> <p>I'm not looking for answers to ALL of these, or course, but if there is a recommended solution to any of them please let me know. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload