Results 1 to 1 of 1

Thread: jquery and ajax not working

  1. #1
    Join Date
    Oct 2011
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default jquery and ajax not working

    i have made one page this is page link
    http://pickthefights.com/fantansy-fi...482&page=fight
    the code of this page is this


    Code:
    <script type="text/javascript">
    
    ////////////////////////////////
    //
    // Refreshing the DIV FANBOO2
    //
    ////////////////////////////////
    
    function refreshdiv_fanboo2(){
    
    // Customise those settings
    
    var seconds = 1;
    var divid = "fanboo2";
    var url = "http://pickthefights.com/fanboo2/?id=<?php echo $idvar ?>";
    
    // Create xmlHttp
    
    var xmlHttp_two = AJAX();
    
    // No cache
    
    var timestamp = fetch_unix_timestamp();
    var nocacheurl = url+"?t="+timestamp;
    
    // The code...
    
    xmlHttp_two.onreadystatechange=function(){
    if(xmlHttp_two.readyState==4){
    document.getElementById(divid).innerHTML=xmlHttp_two.responseText;
    setTimeout('refreshdiv_fanboo2()',seconds*1000);
    }
    }
    xmlHttp_two.open("GET",nocacheurl,true);
    xmlHttp_two.send(null);
    }
    
    // Start the refreshing process
    
    window.onload = function startrefresh(){
    setTimeout('refreshdiv_fanboo2()',seconds*1000);
    }
    
    </script>
    <script type="text/javascript">
    refreshdiv_fanboo2();
    </script>
    <div name="fanboo2" id="fanboo2"></div>
    now what ever i put in fanboo2 page it works fine but javascript or jquery is not working here is code of fanboo2 page, you can check page here http://pickthefights.com/fanboo2/?id=482# here is it is working but not here
    http://pickthefights.com/fantansy-fi...482&page=fight


    Code:
    </script>
    <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
    <script src="http://bxslider.com/sites/default/files/jquery.bxSlider.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    $('#slider1').bxSlider();
    });
    </script>
    
    <ul id="slider1">
    <li>Slide one content</li>
    <li>Slide two content</li>
    <li>Slide three content</li>
    <li>And so on...</li>
    </ul>
    please help me out i want to make java script work on both of this page
    Last edited by jscheuer1; 11-27-2011 at 08:31 AM. Reason: Format

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
  •