Welcome to the Browser-Base Game Zone forums!
<script> setTimeout("window.location.replace('chatlog.php')",2000);</script>
function postChat(line, user, id) { document.getElementById('chat').innerHTML = document.getElementById('chat').innerHTML + user ": " + line; lastid = id window.scrollTo(0,100000);}
I can send you pics of my cocks if you want reference.
if(isset($_POST['message']) && $_POST['message'] != '') { $sql = "INSERT INTO message(chat_id, user_id, user_name, message, post_time) VALUES (" . db_input($_GET['chat']) . ", 1, '" . db_input($_POST['name]) . "', '" . db_input($_POST['message']) . "', NOW())"; db_query($sql);}
if(isset($_POST['message']) && $_POST['message'] != '') { $sql = "INSERT INTO message(chat_id, user_id, user_name, message, post_time) VALUES (" . db_input($_GET['chat']) . ", 1, '" . db_input($_SESSION['name']) . "', '" . db_input($_POST['message']) . "', NOW())"; db_query($sql);}
function sendChatText() { if (sendReq.readyState == 4 || sendReq.readyState == 0) { sendReq.open("POST", 'getChat.php?chat=1&last=' + lastMessage, true); sendReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); sendReq.onreadystatechange = handleSendChat; var param = 'message=' + document.getElementById('txt_message').value; param += '&name=Ryan Smith'; param += '&chat=1'; sendReq.send(param); document.getElementById('txt_message').value = ''; } }
function sendChatText() { if (sendReq.readyState == 4 || sendReq.readyState == 0) { sendReq.open("POST", 'getChat.php?chat=1&last=' + lastMessage, true); sendReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); sendReq.onreadystatechange = handleSendChat; var param = 'message=' + document.getElementById('txt_message').value; param += '&chat=1'; sendReq.send(param); document.getElementById('txt_message').value = ''; } }
function handleReceiveChat() { if (receiveReq.readyState == 4) { //Get a reference to our chat container div for easy access var chat_div = document.getElementById('div_chat'); //Get the AJAX response and run the JavaScript evaluation function //on it to turn it into a usable object. Notice since we are passing //in the JSON value as a string we need to wrap it in parentheses var response = eval("(" + receiveReq.responseText + ")"); for(i=0;i < response.messages.message.length; i++) { chat_div.innerHTML += response.messages.message[i].user; chat_div.innerHTML += ' <font class="chat_time">' + response.messages.message[i].time + '</font><br />'; chat_div.innerHTML += response.messages.message[i].text + '<br />'; chat_div.scrollTop = chat_div.scrollHeight; lastMessage = response.messages.message[i].id; } mTimer = setTimeout('getChatText();',2000); //Refresh our chat in 2 seconds }}