Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Student projects/Automatic accessibility checking/GetSource.

Student projects/Automatic accessibility checking/GetSource: Difference between revisions

From MoodleDocs
m (soap client)
(Complete source AJAX)
Line 14: Line 14:
<p class="note">Soap Client: http://www.guru4.net/articoli/javascript-soap-client/en/</p>
<p class="note">Soap Client: http://www.guru4.net/articoli/javascript-soap-client/en/</p>


Iframe?
<p class="note">Complete source using AJAX</p>
<code>
if("XMLHttpRequest" in window)xmlhttp=new XMLHttpRequest();
if("ActiveXObject" in window)xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp.open('GET', location.pathname,true);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState==4) {
alert(xmlhttp.responseText);
//var source = xmlhttp.responseText;
//document.write(source);
}
};
xmlhttp.send(null);void(0);
</code>

Revision as of 15:09, 26 May 2008

document.getElementsByTagName('html')[0].innerHTML

Soap Client: http://www.guru4.net/articoli/javascript-soap-client/en/

Complete source using AJAX

if("XMLHttpRequest" in window)xmlhttp=new XMLHttpRequest(); if("ActiveXObject" in window)xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); xmlhttp.open('GET', location.pathname,true); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState==4) { alert(xmlhttp.responseText); //var source = xmlhttp.responseText; //document.write(source); } }; xmlhttp.send(null);void(0);