ajax - / remote scripting library / (c) copyright 2005...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// remote scripting library // (c) copyright 2005 modernmethod, inc var sajax_debug_mode = false; var sajax_request_type = "GET"; /** * if sajax_debug_mode is true, this function outputs given the message into * the element with id = sajax_debug; if no such element exists in the document, * it is injected. */ function sajax_debug(text) { if (!sajax_debug_mode) return false; var e= document.getElementById('sajax_debug'); if (!e) { e= document.createElement("p"); e.className= 'sajax_debug'; e.id= 'sajax_debug'; var b= document.getElementsByTagName("body")[0]; if (b.firstChild) b.insertBefore(e, b.firstChild); else b.appendChild(e); } var m= document.createElement("div"); m.appendChild( document.createTextNode( text ) ); e.appendChild( m ); return true; } /** * compatibility wrapper for creating a new XMLHttpRequest object. */ function sajax_init_object() { sajax_debug("sajax_init_object() called. .") var A; try { // Try the new style before ActiveX so we don't // unnecessarily trigger warnings in IE 7 when // set to prompt about ActiveX usage A = new XMLHttpRequest(); } catch (e) { try { A=new ActiveXObject("Msxml2.XMLHTTP");
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

ajax - / remote scripting library / (c) copyright 2005...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online