SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Refreshing script other than ajax and jquery using in php

    Hi

    I am working on an auction website using php. Whenever a user place a new bid, that product price only should be refreshed.
    Now I could refresh that by using one ajax/jquery refresh with setimeout function.
    But the problem is that the script is not working consistently. Sometimes it works fine and some times not.

    Is there any other method for auto refreshing other that client side using in php?

  2. #2
    Free Geek computerages's Avatar
    Join Date
    Oct 2004
    Location
    /dev/null
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mind posting the code here?

  3. #3
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the ajax code I used in the page

    require_once("jqSajax.class.php");
    $ajax=new jqSajax();
    $ajax->export("m_getMaxbid", "trans->m_getMaxbid");//export function

    $ajax->processClientReq();


    <script type="text/javascript">
    function m_reload_all_data()
    {
    var k = $.x_trans_m_getMaxbid();
    if(k!=0){

    var pid=k[1];
    var maxbid=k[2];
    var minbid=k[3];
    <!--var bal = k[4];-->

    $('#maxdiv'+pid).html('<span class="rs"><img src="images/rs.jpg" alt="Rs." /></span>&nbsp;&nbsp;'+maxbid);
    $('#mindiv'+pid).html('<span class="rs"><img src="images/rs.jpg" alt="Rs." /></span>&nbsp;&nbsp;'+minbid);
    <!--$('#stat').html(bal);-->
    }

    //clearTimeout(5000);
    //alert('function call');
    setTimeout("m_reload_all_data()", 10000);
    }
    m_reload_all_data();


    The script is invoking a php method using javascript . The php method is continuously checking for the change in bid price


Tags for this Thread

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
  •