Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<?php ?> <title>ChatBox function submitChat(){ if(form1.uname.value "" ''|| form1.msg.value "" ''){ alert('All fields are Mandatory!!!'); return; } var uname = form1.uname.value; var msg = form1.msg.value; var xmlhttp = new XMLhttpRequest(); xmlhttp.onreadystatechange = function(){ if(xmlhttp.readystate==&&xmlhttp.status==200){ document.getElementbyid('chatlogs').innerHTML = xmlhttp.responseText; } } xmlhttp.open('GET','insert.php?uname='+uname+'&msg='+msg,true); xmlhttp.send(); } Enter Your Chatname:
Your Message:

send

Loading chatlogs please wait...


What I have tried:

<?php ?> <title>ChatBox function submitChat(){ if(form1.uname.value "" ''|| form1.msg.value "" ''){ alert('All fields are Mandatory!!!'); return; } var uname = form1.uname.value; var msg = form1.msg.value; var xmlhttp = new XMLhttpRequest(); xmlhttp.onreadystatechange = function(){ if(xmlhttp.readystate==&&xmlhttp.status==200){ document.getElementbyid('chatlogs').innerHTML = xmlhttp.responseText; } } xmlhttp.open('GET','insert.php?uname='+uname+'&msg='+msg,true); xmlhttp.send(); } Enter Your Chatname:
Your Message:

send

Loading chatlogs please wait...
Posted
Comments
Patrice T 13-Aug-18 5:01am    
define 'not working'

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900