Portal Home > Knowledgebase > Articles Database > Anyone know AJAX or find a tuturial to simply select and display DB info...
Anyone know AJAX or find a tuturial to simply select and display DB info...
Posted by lexington, 09-22-2007, 11:40 AM |
Hello, I have searched but cannot find a very simple AJAX example that displays updated data from the DB automatically. I have installed an AJAX chat script and managed to use php to insert data into the DB when a user does an action. The AJAX chat script is able to display whatever I inserted into the DB in the chat field. I was wondering if I could have a separate AJAX section that updates info in an HTML table as well. So when someone joins a room, that table will display their info pulled from the DB. I can get the AJAX chat script to do it but since it has so many other functions I am not sure which part actually handles that function so could anyone tell me or provide me with a simple tutorial that updates a page automatically with new info using AJAX? Every AJAX tutorial I see on the net requires a submit action or no DB interaction or is just hard to understand.
|
Posted by justforselling1, 09-22-2007, 01:52 PM |
Check the AJAX prototype library at prototypejs .org . Periodicalupdater function is what you are looking for
|
Posted by lexington, 09-25-2007, 08:03 PM |
Thanks, I looked at that but it would be great if I can find a tuturial that simply gives me an example of full code of AJAX checking a file for updates and then displaying that info on a section of my webpage. Everything on the internet has the "click a button and watch AJAX do this" which are useless in my case. Thanks.
|
Posted by lexington, 09-26-2007, 07:04 AM |
Nevermind someone has helped me already by providing me with an example so I got it to work. I did notice though that AJAX is kinda like an iframe within a page since if you try to do a redirect it just redirects inside the section where the ajax code is placed and not the whole page.
|
Posted by juangake, 09-28-2007, 04:09 AM |
It would be nice for the others to have that example lexington
|
Add to Favourites Print this Article
Also Read
Deep Linking (Views: 638)
neo-host.com? (Views: 824)