I'm open to suggestions on other ways to accomplish this, but right now I'm trying to use innerHTML to do the following:
I have a page in a frame that lists artists/bands in a form something like this:
<div onClick="showAlbum(artist1)">Artist 1</div><div id="artist1"></div>
<div onClick="showAlbum(artist2)">Artist 2</div><div id="artist2"></div>
the showAlbum() function replaces the empty div after each artist with a list of their albums and tracks in the database. The problem is that from this loooong list of artists (some thousands of them) only one or two artists are ever going to be clicked at one time, so I don't want to spend the resources loading the artists + thousands more albums + tens of thousands (roughly 40,000) tracks into hidden <div> tags in advance. However, I still want to display the albums inline (not in a separate iframe). If there is some way to include a <div> from an unloaded page, I'd love to be able to do that. Something that could use document.getElementById('albumList') from some page albumList.php?artist1 and insert it into innerHTML or something like that would be unbelievably good.