[ Index ] |
|
Code source de Zelune 2.1 |
1 var xml = makeXML(); 2 function makeXML () { 3 if (typeof XMLHttpRequest == 'undefined') { 4 objects = Array( 5 'Microsoft.XMLHTTP', 6 'MSXML2.XMLHTTP', 7 'MSXML2.XMLHTTP.3.0', 8 'MSXML2.XMLHTTP.4.0', 9 'MSXML2.XMLHTTP.5.0' 10 ); 11 for (i in objects) { 12 try { 13 return new ActiveXObject(objects[i]); 14 } catch (e) {} 15 } 16 } else { 17 return new XMLHttpRequest(); 18 } 19 } 20 function custom_handler () { 21 /* 22 If you want to add any additional JavaScript, here is the place to do it. 23 It will be called after the page is fully loaded. 24 */ 25 } 26 function toggle_form () { 27 get('proxy_toggle').innerHTML = get('proxy_form').style.display == 'none' ? 'Hide Me' : 'Show Me'; 28 get('proxy_form').style.display = get('proxy_form').style.display == 'none' ? 'block' : 'none'; 29 } 30 function get (id) { 31 return document.getElementById(id); 32 } 33 function load_handler () { 34 xml.open('get', 'form.php'); 35 xml.onreadystatechange = function () { 36 if (xml.readyState == 4) { 37 document.body.innerHTML += xml.responseText; 38 get('new_url').value = __new_url; 39 get('__no_javascript').checked = __no_javascript ? 'checked' : ''; 40 get('__no_images').checked = __no_images ? 'checked' : ''; 41 get('__no_title').checked = __no_title ? 'checked' : ''; 42 get('__no_meta').checked = __no_meta ? 'checked' : ''; 43 custom_handler(); 44 } 45 } 46 xml.send(null); 47 } 48 if (typeof window.addEventListener != 'undefined') { 49 window.addEventListener('load', load_handler, false); 50 } else if (typeof document.addEventListener != 'undefined') { 51 document.addEventListener('load', load_handler, false); 52 } else if (typeof window.attachEvent != 'undefined') { 53 window.attachEvent('onload', load_handler); 54 } else { 55 if (typeof window.onload == 'function') { 56 var existing = onload; 57 window.onload = function () { 58 existing(); 59 load_handler(); 60 } 61 } else { 62 window.onload = load_handler; 63 } 64 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Nov 20 19:41:18 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |