RE: Dynamic form changes without refresh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mayer, Jonathan wrote:

> I suppose that, as well as updating the database when I click the
> link, I could also update a CSS toggle, but I'd really like it to be
> deciding whether to toggle only based on the flag in the database.
> 
> So:
> 
> // check database
> if ($toggle == 1)
> {
>    <textarea>...</textarea>
> }
> else
> {
>    <textarea disabled>...</textarea>
> }
> 
> This is called every time the page is refreshed, of course, but if the
> database is changed afterwards, the form doesn't know. I would like
> some way of continually checking in the background whether $toggle is
> 1 or 0, and update the form appropriately. I assumed AJAX was the way
> to go.

Ajax or iframe-rpc would work, yes.  Continually poll your database and
set the display attribute accordingly.  


/Per Jessen, Zürich


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux