All pastes #241126 Raw Edit

xorc

public javascript v1 · immutable
·published 2006-11-06 00:47 UTC
rendered paste body
Added-------index.php Line 654<script type="text/javascript">function ajax_call (url) {        // httpRequest var should be assigned to the xmlhttprequest object    var httpRequest = new XMLHttpRequest();        // But if it doesnt succeed, set it too the activexobject for internet explorer    if (!httpRequest) httpRequest = new ActiveXObject("Microsoft.XMLHTTP");    // And if everything fails, return false.    else if (!httpRequest) {        return false;    }    // We're not doing xml, no sir!    httpRequest.overrideMimeType('text/plain');    // Request handler.    httpRequest.onreadystatechange = function () {        // Switchboard for ajax - states        switch (httpRequest.readyState) {                        // loading            case 1:            case 2:                // Do something                        break;            // interactive, interessting            case 3:                // TODO::FINDOUT                break;                        // Ready state.            case 4:                    // Successful!                    return true;                break;        }    }        // Request the url given in the paramters    httpRequest.open('GET', url, true);    // TODO::WHATS THIS?    httpRequest.send(null);            // Well, it didnt go too well    return false;}function multi_delete () {    // Get elements from DOM Tree    var objListDelete = document.getElementsByTagName('tbody')[7].getElementsByTagName('a');    // Store the number of DOM Tree elements in var    var numListDelete = objListDelete.length;    // Loop until the pointer runs out    while (numListDelete > 0) {                // Decrease pointer        numListDelete--;                // If it isnt a delete button, discard, goto next        if (objListDelete[numListDelete].className != 'delete_button') continue;        // Call with ajax (Async javascript something something)        ajax_call(objListDelete[numListDelete]);    }    // Successful!    return true;}</script>Changed-------functions.php Line 2471From        $output .= "<a class='delete_button' href=\"".$deletelink."\" onclick=\"return ConfirmDelete('".$entry."'); \"><img src=\"images/delete_on.gif\" width=16 height=16 title=\""._DELETE."\" border=0></a>";To        $output .= "<a class='delete_button' href=\"".$deletelink."\" onclick=\"return ConfirmDelete('".$entry."')\"><img src=\"images/delete_on.gif\" width=16 height=16 title=\""._DELETE."\" border=0></a>";