Will images not load with the page if the image tags are written with javascript and require user input?
<p>I wanted a way to load images only when needed but am hesitant to use AJAX. Instead, will something like this work?</p>

<pre><code>&lt;div onclick="loadimages()"&gt;Section Title&lt;/div&gt;
&lt;script type="text/javascript"&gt;
function loadimages()
{
    document.write('&lt;img src="images/thumbnail1.jpg" /&gt;');
    document.write('&lt;img src="images/thumbnail2.jpg" /&gt;');
    document.write('&lt;img src="images/thumbnail3.jpg" /&gt;');
}
&lt;/script&gt;
</code></pre>

<p>The intent is for the images to appear below the "Section Title" when that div is clicked, and for the images to be loaded only at that time.</p>
