Try to pull this algorithm into a function, then add it to the onLoad attribute of your body element, so on the each load it call the function which calls it self each X seconds interval (use the functions mentioned by Todd) On 05/06/2008, Mayer, Jonathan <jmayer@xxxxxxxxxxx> wrote: > > Hiya all, > > I have a PHP page with a form holding a large number of textarea boxes. > > These text boxes are individually set as enabled or disabled based on a > flag > held in a MySQL database. > > I want to be able to dynamically enable or disable a specific box without > the page being recalled (potentially loosing the parameters passed, and > having to rebuild a large complex table). > > Using some basic javascript/AJAX, I have set up a link next to each text > box, which calls code that updates the database in the background without > refreshing the page. If I manually refresh the page, the textarea box in > question updates correctly, proving that the database update has worked. > However, I cannot work out how to get the textarea boxes to toggle the > disable on/off "on the fly". I assume they would need to continually check > the database and adjust as required. > > I realise there may not be too much PHP involved here, but I was wondering > whether anyone could assist or point me in the right direction. > > Thanks, > Jon. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >