Jump to content

PHP/AJAX Button Update?


LAEinc. Creations

Recommended Posts

does anyone know ajax?

 

I am trying to script a page, where lets say two different people have the page open, at the same time, and one of them clicks on a button. I want that button, and that button only, on a page filled with buttons, to update on both screens, even if the other viewer is not clicking on anything.

 

Another simpler example, is it possible to make an ajax script capable of updating a buttons status (pressed, or released looking) using CSS, and ajax?

I want to be able to have a page, where if one person on the net presses a button marked, for example, "ON", then that same button will be pressed/lit up on everyones page that is currently viewing that site.

 

I dont know how else to explain it.

 

I dont want it to be a massive server hog either, but id like it to be as real time as possible.

any luck guys?

 

Thanks in advanced, I have 0 knowledge with ajax, or javascript

Link to comment
https://forums.phpfreaks.com/topic/184873-phpajax-button-update/
Share on other sites

YOU SURE CAN.. just not with AJAX.. you can in flash/as3 with externalinterface, and sockets..

 

http://lovinglori.com/newServer.phps is a php script you can run on your home computer to turn your computer into a server that listens for connections and handle data and distribute it across every connected user..

 

for example.. you'd want to have 1 server.. and ALL your clients connect to that server.. then when a user clicks a button.. you send some information to the server.. and you code your server to relay all that information to all connected clients.. and then you use externalinterface from flash to use javascript in order to modify the page the way the server demands you to. it sounds complex but its not :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.