School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,394 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,594 people online right now. Registration is fast and FREE... Join Now!




Reload query

 

Reload query

Ennio

22 Apr, 2009 - 09:37 AM
Post #1

New D.I.C Head
*

Joined: 29 May, 2008
Posts: 22



Thanked: 1 times
My Contributions
I have a query that checks if a user has a private message in my forum, the query runs every time the users goes to the inbox page and if the user has a message it updates the number of new messages on the page.

I would like to know how can I do that using ajax, so it would upate the variable every 5 minutes or so.

Thank you

smile.gif

User is offlineProfile CardPM
+Quote Post


natel

RE: Reload Query

2 May, 2009 - 01:43 PM
Post #2

New D.I.C Head
*

Joined: 2 May, 2009
Posts: 1

Not sure if this is the best way, but here's how I know how to do it. Use jQuery's $.get or $.getJSON function and call that function every 5 minutes using Javascript's setTimeout function.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 09:56PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month