I decided to go with some JQuery with Ajax function and it solved my problem perfectly. I included a couple script links to the page displaying the messages, messages.cfm
<script language="javascript" src="http://equifax.ipushjobs.com/jquery/jquery-1.2.6.min.js"></script>
<script language="javascript" src="http://equifax.ipushjobs.com/jquery/jquery.timers-1.0.0.js"></script>
Then added this script.
<script language="javascript">
$(document).ready(function(){
var j = jQuery.noConflict();
j(document).ready(function()
{
j(".refreshMe").everyTime(5000,function(i){
j.ajax({
url: "messck.cfm?code=#getuser.code#",
cache: false,
success: function(html){
j(".refreshMe").html(html);
}
})
})
});
j('.refreshMe').css({color:"red"});
});
</script>
Next i placed an empty div at the end of the page.
<div class="refreshMe"></div>
This is my messck.cfm It checks for a new message from the user. If there is a new message it causes the page to refresh.
<cfquery name="ckfornew" datasource="mysource">
SELECT code
FROM messages
WHERE code = '#url.code#' AND friend = '#session.code#' AND seendate IS NULL
ORDER BY ID DESC
</cfquery>
<cfif ckfornew.recordcount EQ 0>
<cfelse>
<cfoutput>
<meta http-equiv=Refresh content="0;url=messages.cfm?code=#ckfornew.code#">
</cfoutput>
</cfif>
I appreciate the input and direction!