All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

Fun with AJAX

  • # December 15, 2009 at 11:54 am

    Hello Again, So,
    I need to refresh a div which only holds data that had been populate through php. So this is the div at the moment.

    Code:
    < ?php include_once("example.php"); ?>

    And i need to refresh that with out refreshing the whole page, basically the contents of the example php file have changed and so need to reload them.
    I thought that Ajax would probably be my best bet but i’m not sure how to get it to work.
    So the function has been called, then in the ajax i do,

    Code:
    document.getElementById(“example”).innerHtml = “…

    Is this the right start, if so what now?

    I just wrote this code from my head so there are probably some errors but i just wanted to get a general idea of where to go now.

    Many Thanks
    Chris

    # December 15, 2009 at 10:22 pm

    Net Tuts has a two part series on creation Ajax requests from scratch.

    Part 1:
    http://net.tutsplus.com/videos/screenca … avascript/

    Part 2:
    http://net.tutsplus.com/videos/screenca … pt-part-2/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed