Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jquery/ajax dynamic loading

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25322
    nanook
    Member

    Morning all,

    I’m in need of a little guidance, I have setup my menu to load my content from an external page, for the home and about us page it loads just fine. My problem is the subscribe link goes directly to my shopping cart and does not pull that information from the same page as the others. I would love to have all the content as well as the shopping cart load without refreshing so any ideas would be greatly appreciated. You can see the code at http://dev.howsmykiddriving.org. Thanks in advance.

    Tim

    #60072
    Hugo
    Member

    Firebug reports an error when I enter the page:

    Code:
    loadContent is not defined
    onload(load)
    [Break on this error] loadContent(1);

    Have a look at that first.

    So if I get this straight (correct me if I’m wrong here), everytime you click a menu item there’s a [ajax] GET request to the PHP files pages.php and images.php, using one variable called ‘o’ which holds a numeric value which represents (I assume) a page ID.

    Your javascript/ajax requests are fine for the home item (o=1), the subscribe item (o=2), and the about us item (o=3). The FAQ and Login items pass an empty variable, represented as o= .
    From the first 3 items listed above, only subscribe is not working. The problem is in your PHP file. Just follow by hand what it does when pages.php and images.php receive $_GET == 2, there seems to be nothing wrong with your javascript.
    Regarding FAQ and Login – they are not passing anything yet to the PHP files but an empty variable, but that’s not what you asked for.

    I hope I helped you somewhat.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.