PDA

View Full Version : Dynamically load multiple external html pages into multiple divs on page load?


wonderstew
03-16-2009, 08:09 AM
Again, a disclaimer. I'm a designer, not a coder... but I always find myself in these situations. I'm a javascript novice so please keep it elementary.

I need to load multiple html "snippets" into separate divs on page load.

I found a great javascript that does what I need... but it requires an <a href> and I can only load into one DIV at a time.

Here's my little test page. (http://rustbucketbingo.com/gfc/product_pages/test_dynamic_div.html)

So, imagine this page will have 20 individual DIVs on it and each one needs to load a separate html file into it when the page loads.

Any help would be overwhelmingly appreciated.

wonderstew
03-16-2009, 12:44 PM
Solved it myself.

I originally tried using <body onload> but I'm dealing with Dreamweaver templates and it's a huge pain to make the body tag editable.

So I ended up using a window.onload function in the editable region of my header. That seemed to do the trick.