SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    \m/\m/ karinne's Avatar
    Join Date
    Dec 2002
    Location
    Aylmer, QC, Canada
    Posts
    409
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is this AJAX or something else?

    If anyone uses Ta-da Lists by 37signals, when you create a new item in your list and re-order them withe drag and drop... is that AJAX?! Or are they using something else?

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I don't know, but it sounds like AJAX...
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #3
    \m/\m/ karinne's Avatar
    Join Date
    Dec 2002
    Location
    Aylmer, QC, Canada
    Posts
    409
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Going back the the ta-da lists site, they have this at the bottom in the Ta-da List Q&A

    Ta-da uses some advanced Javascript to reduce the number of page reloads required, and only certain modern browsers can support this.
    hmmm

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Drag-and-drop reordering doesn't require Ajax, but it does need JavaScript. Ajax is used for retrieving data from a server, and that's not necessary for reordering a list. You just add event listeners for mouse movement and key presses and modify the list item positions (either by using CSS or by rearranging the underlying DOM).
    Birnam wood is come to Dunsinane

  5. #5
    \m/\m/ karinne's Avatar
    Join Date
    Dec 2002
    Location
    Aylmer, QC, Canada
    Posts
    409
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah thanks for that clarification Tommy

  6. #6
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    BUT, if you re-organise a list and it stays in the order you set it on page reload, it does use AJAX.

    Tommy, AJAX doesn't just retrieve data from the server. It runs the SS program, and if anything is returned, it will display it. E.g. If it does stay in order, it will send a mysql_query to update that order to your user-id. Then, it will update the page.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  7. #7
    \m/\m/ karinne's Avatar
    Join Date
    Dec 2002
    Location
    Aylmer, QC, Canada
    Posts
    409
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arkinstall View Post
    It runs the SS program, ...
    What's an SS program?

  8. #8
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    a Server Side program, such as a script in PHP.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  9. #9
    \m/\m/ karinne's Avatar
    Join Date
    Dec 2002
    Location
    Aylmer, QC, Canada
    Posts
    409
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh ... right DUH!

  10. #10
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arkinstall View Post
    BUT, if you re-organise a list and it stays in the order you set it on page reload, it does use AJAX.
    Not necessarily.

    Quote Originally Posted by arkinstall View Post
    Tommy, AJAX doesn't just retrieve data from the server. It runs the SS program, and if anything is returned, it will display it.
    Ajax is a collective term for a number of techniques and technologies that are frequently used together. It usually involves an HTTP request (often asynchronous) from a client to a server, whereupon the server returns some information (typically as an XML document) that the client parses and uses to modify an existing DOM tree without reloading the page.

    You don't need Ajax to re-order a list. If you want the new order to be remembered, you'd normally set a cookie. Of course, you could store this state information on the server-side, but you'd still need some way to identify each client since HTTP is a state-less protocol.
    Birnam wood is come to Dunsinane

  11. #11
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    well, if they have to log in, you set their php $_SESSION['userid'] variable. Then the PHP code finds that, and re-organises their list on the database.

    This is better if your browser has cookie disabled.

    After school, i'll register on the site and go through the page sources.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  12. #12
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sessions still require some sort of identifier to be sent from the client. That means using a cookie or URL rewriting.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •