Results 1 to 6 of 6

Thread: Ajax Form Question - Reacting to New Data?

  1. #1
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default Ajax Form Question - Reacting to New Data?

    Hi all,

    I want to have a form that sends data to a server each time a form control is blurred. This part I know how to do.

    But another user will be watching the data that comes through. How can I get the other user's page to react to changes in the data (like what technologies should I be using)? The goal is an Ajax/page-refresh-less experience on both ends.

    Thanks!

  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    ok so you know how to send the data via ajax. now there should be a php script that writes the data to either a file or database. then the 2 person should have a page where ajax goes to a php page that retrieves the data saved. the ajax should run every 5 seconds or so using a timeout or interval.
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  3. #3
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default

    Thanks for your reply.

    Is using a timed retrieval the only way to check for new data? I was hoping there would be some way for person 2 to have some kind of constant connection to the server. Now that I think about it, I guess what I'm looking for is closer to some sort of rudimentary P2P technology.

    If that tech is out there, I don't need a guide on how to use it - just need to know what tools are needed to accomplish this.

  4. #4
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    The only way to use p2p is through additional software, like http://blog.peeraware.com/2008/05/04...ript-and-html/. I think a timed retrieval is a good method for what you want, almost like an ajax chat script, but ultimately it is up to you.
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  5. The Following User Says Thank You to Master_script_maker For This Useful Post:

    jlizarraga (03-13-2009)

  6. #5
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default

    Doh! I wouldn't have thought to look for chat scripts, thank you!

  7. #6
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    You're Welcome
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

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
  •