<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Na ff przestaje działać onclick i inne funkcje w czacie i jest tak tylko w FF. Po wywaleniu tego działa Onclik, ale przestają działać inne elementy.
Kod chatu:
a tu kod JS chatu:
var nick="<?php print $nick; ?>"; var nick=nick.replace(/\+/,"plus"); function addMessage(){ var x_object = null; if(window.XMLHttpRequest){ x_object = new XMLHttpRequest(); }else if(window.ActiveXObject){ x_object = new ActiveXObject("Microsoft.XMLHTTP"); }else{ alert('AJAX Error'); return; } x_object.open("POST","chat_add.php",true); x_object.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); msg.value=msg.value.replace(/\+/g,"plus"); x_object.send("nick="+nick+"&msg="+msg.value); msg.value = ""; showMessage(); } function showMessage(){ var x_object2 = null; if(window.XMLHttpRequest){ x_object2 = new XMLHttpRequest(); }else if(window.ActiveXObject){ x_object2 = new ActiveXObject("Microsoft.XMLHTTP"); }else{ alert('AJAX Error'); return; } x_object2.open("GET","chat_msg.php",true); x_object2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); x_object2.send(null); x_object2.onreadystatechange = function(){ if(x_object2.readyState==4){ if(x_object2.status==200){ document.getElementById('shoutbox').innerHTML = x_object2.responseText; descendreTchat(); Layer1.style.visibility="hidden"; } } } } function addSmiley(smiley){ msg.value=msg.value+smiley; msg.focus(); } setInterval(showMessage,500);
Proszę o pomoc
ponawiam