dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: php&jquery post

  1. #1
    Join Date
    Jul 2013
    Posts
    1

    Exclamation php&jquery post

    hello guys im new here and i need some help with my code.can sombody help me please? so y want to get and update users status .here is my code.tnks



    JQ = jQuery.noConflict();
    function updateStatus()
    {
    var updateOnlinePeriod = 120; //60 secs in all
    JQ.ajax({
    type: 'POST',
    data: {cachetimeout: updateOnlinePeriod},
    url: "UpdateOnlineStatus.php"
    });
    setTimeout('updateStatus()',updateOnlinePeriod*1000);
    }


    JQ(document).ready(function () {
    updateStatus();
    });

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,595
    This is a PHP forum not a JQuery forum

    As for your issue, possibly the fact you use a setTimeout which triggers once, try using a setInterval timer that once set will reun until the process is deleted.
    If your post falls off the page, bump it. ...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles