View Full Version : Ajax Dynamic Content Not Loading

Derrick Barra
05-12-2010, 03:19 AM
1) Script Title: Dynamic Ajax Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem:

Hey guys I'm using this script on my webpage...

In order to dynamically load up my navigation.html webpage, which appears on all pages except for my splash page. It should be on the top right side of the page (absolutely positioned).

When I created this page in dreamweaver it tested fine locally but now that its online its not showing up. I've checked to make sure nothing is pointing to a local address.

The script I'm using should automatically load the navigation.html page when the page is loaded.

The code that loads the navigation page is below.
<script type="text/javascript">
ajaxpage('navigation.html;', 'NavigationWrapper')

The div that contains the navigation.html is the same size as the wrapper containing the contents of navigation.html.

For reference heres what navigation.html (http://farm5.static.flickr.com/4023/4599897511_b590ab0596_o.png)looks like when working properly.

05-12-2010, 08:35 AM
On resume.html this:

<script type="text/javascript">
ajaxpage('navigation.html;', 'NavigationWrapper')

comes before this:

<div id="NavigationWrapper" class="NavigationWrapper">


So, even if it didn't have the highlighted syntax error, it wouldn't work.

Move it to after the target division and correct the syntax error (remove the semi-colon).

Derrick Barra
05-12-2010, 03:57 PM
Thanks so much! I was unaware that the script had to be called after the div was created (makes sense in normal programming, didn't realize that was the way it worked in html).