here is the code.... just for a simple chat program..
the chat message will be display at the div class:'chit'
the chat message has an id 'chat'... which will be diplayed on the screen..
chat.js execute an ajax script to get the chat data from the server...
hope u get me...
thanks...
<html>
<head>
<script src='chat.js'></script>
<script type='text/javascript'>
function preSend(){
message=document.form1.chat.value
send(message)
}
function preReceive(){
receive()
setTimeout('preReceive()',500)
}
</script>
<style type='text/css'>
div.chit{
background-color:'#00FF00';
width:150px;
height:150px;
overflow: auto
}
</style>
<LINK REL="SHORTCUT ICON" HREF="favicon.ico">
</head>
<body onload='preReceive()'>
<div class='chit'>
<span id='chat'>
</span>
</div>
<form name=form1 action='index.php'>
<input type='text' name='chat'>
<input type='button' value='send' onclick=preSend()>
</form>
</body>
</html>