1.949 views
Ik weet dat er al veel tutorials en scripts zijn, maar ik begrijp er echt geen ene ......... van. Is er iemand die even wat tijd heeft om het nou eens GOED uit te leggen???
<script language='javascript'>
function chatten2(){
function createHTTPHandler(){
httphandler = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
httphandler = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
httphandler = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
httphandler = false;
}
}
@end @*/
if (!httphandler && typeof XMLHttpRequest!='undefined') {
httphandler = new XMLHttpRequest();
}
return httphandler;
}
var XMLHTTPObject = createHTTPHandler();
XMLHTTPObject.open('GET', 'chatbox.php', true);
XMLHTTPObject.onreadystatechange=function() {
if (XMLHTTPObject.readyState==4) {
//die iets leuks
}
}
XMLHTTPObject.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
XMLHTTPObject.setRequestHeader('Connection', 'close');
XMLHTTPObject.send(null);
}
function chatten(){
var text1='<?php echo $text1; ?>'
var text2='<?php echo $text2; ?>'
var text3='<?php echo $text3; ?>'
var text4='<?php echo $text4; ?>'
var text5='<?php echo $text5; ?>'
document.chat.text1.value=text1
document.chat.text2.value=text2
document.chat.text3.value=text3
document.chat.text4.value=text4
document.chat.text5.value=text5
setTimeout("chatten2()",2000)
}
chatten();
</script>