View Full Version : JS/AJAX help [+rep and 1HC]
Decode
01-06-2008, 03:35 PM
I need an ajax script that can display a file called data.txt and refresh it every 3 seconds. Please dont suggest iframes because they make a horrible noise when they refresh.
+rep and 1hc on habbo if you can make or find me one :)
--ss--
01-06-2008, 03:39 PM
http://www.pixel2life.com/forums/index.php?s=&showtopic=39076&view=findpost&p=245699 Google "Auto ajax div refresh" ;)
(To display the content off the file just use an PHP include in the actual div)
Florx
01-06-2008, 03:42 PM
<script src="http://www.habbopress.com/maintain/prototype.js" type="text/javascript"></script>
<script src="http://www.habbopress.com/maintain/scriptaculous.js" type="text/javascript"></script>
<div id="databox">Loading...</div>
<script>
new Ajax.PeriodicalUpdater('databox', 'data.txt', {
method: 'get', frequency: 3
});</script>
Try that :)
Decode
01-06-2008, 03:48 PM
http://www.pixel2life.com/forums/index.php?s=&showtopic=39076&view=findpost&p=245699 Google "Auto ajax div refresh" ;)
(To display the content off the file just use an PHP include in the actual div)
Ty +rep :) Ive send u an fr on habbo if u want the hc.
edit, cant give u rep atm :(
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.