Code:
<script type="text/javascript">
$('document').ready(function(){
var url = '<?php echo $_SERVER['PHP_SELF'];?>';
var timestamp = 0;
var interval = 5000;
var first = true;
$('#formChatForm').bind('submit', function(e){
e.preventDefault();
$.post(url,$(this).serialize() + '&action=writeChatData', function(d){update();},'json');
if(first && $('input[name="chatPerson"]').val() != ""){
$('input[name="chatPerson"]').replaceWith($('<span>'+ $('input[name="chatPerson"]').val() + '</span>'));
}
return false;
});
var update = function(){
$.post(url, 'action=getChatData×tamp='+timestamp, function(d){
timestamp = d.timestamp;
$('#chatTable').prepend(d.chatText);
}, 'json');
}
var timer = setInterval(update, interval);
update();
});
</script>
hello I was wondering if there is a way to strip the html from
Code:
if(first && $('input[name="chatPerson"]').val() != ""){
$('input[name="chatPerson"]').replaceWith($('<span>'+ $('input[name="chatPerson"]').val() + '</span>'));
thanks in advance
MA WarGod
I believe if someone can think it, it can be programmed