Student projects/Automatic accessibility checking/GetSource: Difference between revisions
From MoodleDocs
David Knight (talk | contribs) m (soap client) |
David Knight (talk | contribs) (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> | ||
<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
- http://forums.digitalpoint.com/showthread.php?t=242562
- http://developer.mozilla.org/en/docs/DOM:document.doctype
- http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html
- http://developer.mozilla.org/en/docs/DOM:document.documentElement
- http://developer.mozilla.org/en/docs/DOM:document.doctype
- http://www.w3schools.com/dom/prop_document_doctype.asp
- http://javascript.internet.com/page-details/dom-browser.html
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);