Ajaxed sayfası ve jQuery

0 Cevap php

Ben tüm web üzerinden baktım ama bir çözüm bulamıyor. 1 Sonunda benim bellek durdurmak için bir yol burada stackoverflow üzerinde aynı sorunu (ve senaryoyu yazdı adam) olan bir adam sayesinde kaçakları bulundu. Şimdi bu bellek sızıntısı düzeltme başka benim için problem yaratıyor.

Benim üyeleri listesi düzeltme kullanarak ajax denir. Ama düzeltme çağırıyor üyeleri sayfada bir araç ipucu var. Düzeltme çağırıyor sayfada HİÇBİR jquery işleri, ben her şeyi denedim.

İşte benim bellek sızıntıları durdurmak için düzeltme bulunuyor.

<script type="text/javascript">
    /**
    * @filename JsAjax.js
    * @author Raju Gautam
    * @version 0.1
    * @copyright Copyright (c) 2007, Author Raju Gautam 
    * @package AJAX Collection
    * @date Dec 31, 2007
    **/
    /* Loading script */
    var strLoading = '<div style="padding:2px;color:#FF0000;height:100%"></div>';

    /****************** AJAX GET Start **************************/
    /*
    * This is the function to send the request to the server
    * @author Raju Gautam
    * @version 0.1
    * @copyright Copyright (c) 2007, Raju Gautam
    * @date Dec 31, 2007
    **/
    function sendGetRequest(para_url, contentDiv, divLoading){
        var url = "";
        var xmlHttp = GetXmlHttpObject();
        if(para_url.indexOf('?')) url = para_url + "&rand=" + Math.random();
        else url = para_url + "?rand=" + Math.random();

        xmlHttp.onreadystatechange = function(){
            afterStateChange(xmlHttp, contentDiv, divLoading);
        }
        xmlHttp.open("GET", url, true);
        xmlHttp.send(null);
    }

    /* This is the function to used to show the response text from server
    * @author Raju Gautam
    * @version 0.1
    * @copyright Copyright (c) 2007, Raju Gautam
    * @date Dec 31, 2007
    **/
    function afterStateChange(xmlHttp, contentDiv, divLoading){ 
        if(xmlHttp.readyState < 4){
            showLoading('On', contentDiv, divLoading);
        }
        if(xmlHttp.readyState == 4 || xmlHttp.readyState == "complete"){
            showLoading('Off', contentDiv, divLoading);
            document.getElementById(contentDiv).innerHTML   = xmlHttp.responseText
        }
    }

    /* This is the function to show/hide the loading message
    * @author Raju Gautam
    * @version 0.1
    * @copyright Copyright (c) 2007, Raju Gautam
    * @date Dec 31, 2007
    **/
    function showLoading(flag, contentDiv, divLoading){ 
        if(divLoading != ''){
            var objLoading = document.getElementById(divLoading);
            if(!objLoading) var objLoading = document.getElementById(contentDiv);
           /* if(flag == 'On') objLoading.innerHTML = strLoading;
            else if(flag == 'Off') objLoading.innerHTML = '';*/
        }
    }

    /*
    * This is the function to create a new XML HTTP object GET Request
    * @author Raju Gautam
    * @version 0.1
    * @copyright Copyright (c) 2007, Raju Gautam
    * @date Dec 31, 2007
    **/
    function GetXmlHttpObject(){
        var xmlHttp;
        try{
            /* Firefox, Opera 8.0+, Safari */
            xmlHttp = new XMLHttpRequest();
        }
        catch (e){
            /* Internet Explorer */
            try{
                xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch(e){
                try{
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch (e){
                    alert("Your browser does not support AJAX!");
                    return false;
                }
            }
        }
        return xmlHttp;
    }
    /****************** AJAX GET End **************************/
    var second = 0;
    var limit = 15;
    function display2(){
        if (second == limit){
            var rand = new Date().getTime();
            var myVal = '1';
            sendGetRequest('allonline.php?rand='+rand, 'scontent', 'scontent');
            second = 0;
        }
        second += 1;
        setTimeout("display2()", 1000);
    }
    display2();
</script>

şimdi ben jquery aracı bu komut dosyasını kullanarak allonline.php sayfasında çalışmak için bir araç ipucu (veya herhangi bir komut dosyası) Qtips alınamıyor.

<script type="text/javascript">
// Create the tooltips only on document load
$(function() 
{
// Use the each() method to gain access to each elements attributes
$('#content6 a[rel]').each(function()
{
$(this).qtip(
{
content: {
// Set the text to an image HTML string with the correct src URL to the loading image you want to use
url: $(this).attr('rel'), // Use the rel attribute of each element for the url to load
title: {
text:$(this).text(), // Give the tooltip a title using each elements text
button: '' // Show a close link in the title
}
},
position: {
corner: {

target: 'leftMiddle', // Position the tooltip above the link
tooltip: 'rightMiddle' 
},
adjust: {
screen: false // Keep the tooltip on-screen at all times
}
},
show: { 
when: 'mouseover', 
solo: true // Only show one tooltip at a time
},
hide:'mouseout',

style: {
tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
border: {
width: 5,
radius: 10
},
padding: 10,
name: 'blue', // Use the default light style
width: 650 // Set the tooltip width
     }
  })
 });
 });
</script>

0 Cevap