views:

570

answers:

4

Can someone tell me why this:

http://dageniusmarketer.com/DigitalWonderland/pages/Portfolio.html

works fine on its own page all by iself, but when I try to load it inside my current site using ajax and jquery, which is,

dageniusmarketer.com/DigitalWonderland/

On the portfolio page, i get this error:

this.loader = new GalleryLoader('gallery.xml', 'gallery', "Madeira"); this.prefetching = 'all';

instead of loading my gallery the way i want? Id really like to know how to fix it as its been bugging me for a few days now.

Any and all help is appreciated,

Thanks.

A: 

And one more thing, how do i get my main content div height to expand to exactly the height of my content? im currently using a global % value, and its either too short for one page or too long for another. I need a remedy for this. You can view my source to see what im doing for the height to see the problem.

Thanks.

A: 

And one last thing, how do i load the home page content into the content div as soon as the site loads instead of having to press the home button before you see anything?

A: 

I get the same error with JavaScript deactivated. Just make sure you activate your JavaScript. For those users - for whatever reason - have disabled their JavaScript I would suggest to supply something different than just this warning. Give them a hint or just a nice alternative without JavaScript. Just another thing, please embed your JavaScript within an appropriate tag:

<script type="text/javascript">
    this.loader = new GalleryLoader('gallery.xml', 'gallery', "Madeira");
    this.prefetching = 'all'; 
</script>
merkuro
A: 

One issue seems to be that you are loading a whole HTML page within a div. If your AJAX call was working properly, you'd end up with code like:

<html>
<head>...</head>
<body>
  <div>
    <html>
      <head>...</head>
      <body>
        ...
      </body>
    </html>
  </div>
</body>
</html>

If you really want something like that, you'd be better off using an iframe.

Jonathan Maddison