What's Web 2.0?

Out of context: Reply #34

  • Started
  • Last post
  • 36 Responses
  • ********
    0

    ok apart from all the huge Arial Rounded, white space and 15pt text, the ajax bit of *.0 is actually piddlingly easy if you're used to doing any kind of recent flash/server interaction.
    Its very very like just using your sendAndLoad method of the LoadVars object - but just in Javascript...

    Get an event to fire your javascript function that
    a) instatiates a new xmlhttp object thingy..
    b) Plop your variables on it..
    c) send it off to the script of your choice, outputting xml/html, connecting to db etc, with a
    d) 'listener' type control structure to see if it comes back 'successfully' (or other)..
    e) it will come back with the data, which you can then just shove into your dom, eg
    getElementByID('text1').innerHTM... = [response from script]..

    and voila, just like you've been doing in Flash for years, data painlessly swaps itself out..

    Thats the very basics, takes you about 5 minutes to run thru and get familiar with it..
    ez

View thread