views:

46

answers:

5

Hey,

I have a page where each logged in user is shown as a <div> at a custom position, is it possible to show where the user's <div> is for other people.

I was hoping I could do this in (near) real time.

Just a nod in the right direction again would be fine.

Cheers

edit: is there a way to do this without MySQL?

+1  A: 

use ajax to check who is connected(thru mysql or anything) and then update your divs with that info. You could pull data every second-minutes whatever you like.

Iznogood
+1  A: 

You can send position of user's <div> via php script and store it somewhere(database, file). And for every user get position of all divs from file/database and display them.

azram19
A: 

is this what you are looking for? http://api.jquery.com/offset/

you wont get arround saving the div position serverside and serving it to everybody then get the result of that via setInterval to update the positions via a js function

Christian Smorra
A: 

You might want to look a node.js, there's a good example of multi-user collaboration here

Lazarus
+1  A: 

Additionally check out projects like http://www.ape-project.org/ which are ajax push engines. Cometd type implementations may be more what you need if you want to go that direction.

Chris