When the user enters new text, another invisible IFRAME is run which posts the message to the database, and then the IFRAME containing the transcript is reloaded. I do all this via JavaScript as outlined below:
Code: Select all
function sndMessage(usrId) {
window.frames.runphp.location.href = 'sendmsg.php?user_id='+usrId+'&msgtxt='+document.postmsg.msgtxt.value;
window.frames.winTalk.location.href = 'talk.php';
document.postmsg.msgtxt.value = '';
document.postmsg.msgtxt.focus;
return false;
}