Hello all,
I've been a lurker for a while, figured now is the time to post my question - hope someone can help me out here...
I am attempting to create a "dashboard" solution for my main page on my Drupal 6.4 site. I want to take data from another Intranet site we have at work - this "data" I want to grab is continuously updating, it changes once every 2+mins. I want to grab this small amount of data, and display it in a block (I say block, but it doesn't have to be a block - I just need to display it on my main page somewhere) - here's the tricky part that I am having a heck of a time figuring out.... I want the data/BLOCK to refresh about once every 2-4 minutes, WITHOUT the end-user having to hit REFRESH to refresh the entire "dashboard" page.
I am thinking this needs to be done with AJAX somehow, and I am brand new to AJAX/Javascripting. I suspect jQuery or AJAX is the solution here, but I just dont know HOW to implement it...
For the sake of presenting an example - here it goes: The code from the Intranet site I want to grab is a basic TIMESTAMP - i.e. "the current time IS xx:xx:xx on October xx, 200x" - also further down the page I want to grab some other data - i.e. "Currently 28 trouble tickets are open", and lastly "5 tickets were created in the last 1hour".
That is pretty much the gist of the data I am trying to grab, I then want to format this data into a "drupal block" (I assume) and have the block go out and pull the new TIMESTAMP, # of TICKETS OPEN, and # of TICKETS OPENED IN 1HOUR information and display it with some form of formating - and last but not least, then have this block UPDATE/REFRESH on it's own, independent of the other blocks and information being displayed on the rest of the dashboard webpage. From my searching it sounds like I need to present the data using AJAX, which will only refresh the "block" but not the entire webpage.
Can someone point me in the right direction here? Or better yet, if you have done this before - show me some example code. I will be forever in yr debt! Thanks much -
agentdcooper

Comments
just read how to do this
Hi Matt,
Chapter 1 in this book:
http://www.packtpub.com/drupal-6-module-development/book/mid/180208f7vnfw
That's "Learning Drupal 6 Module Development" by Matt Butcher
Is a tutorial that does what you need, I believe. He pulls in an RSS feed from GoodReads, and displays the contents in a custom block. Uses drupal_http_request() to actually grab the data.
http://api.drupal.org/api/function/drupal_http_request/6
Tom Wheeler
http://www.wheelercreek.com
Tom Wheeler
http://www.wheelercreek.com
actually, maybe not
Now that I read your post more carefully :) , that may not help too much - as far as the auto-refreshing goes...
Tom Wheeler
http://www.wheelercreek.com