update without reloading browser

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

    Obviously I'm new to PHP. I would like to be able to update a table in a
page from a database on the server without reloading the page each time. Is
this possible with PHP?

Re: update without reloading browser

J. J. Cale wrote:
Quoted text here. Click to load it
Short answer no.

Slightly longer answer.

Remember you are working in an asynchronous environment. The information
displayed on a browser client is a snapshot of the wrold the webserver
sees when the page is requested.
Well, its not quite that simple but you get the idea hopefully, if the
information needs to be refreshed then the server has to be asked for
the page again.

Re: update without reloading browser

noSpam wrote:
Quoted text here. Click to load it

And another answer:

As JJ said, you can't do that with PHP. What you need is Javascript,
specifically HttpXmlRequest, which can do it for you.



Re: update without reloading browser

Berislav Lopac wrote:
Quoted text here. Click to load it

Agree, however what ever mechanism is used to refresh the page be it
Java script VB Script etc it still requires a new request to the server.

Re: update without reloading browser

Following on from J. J. Cale's message. . .
Quoted text here. Click to load it
Not really.  For example you couldn't update the table _display_.
But you can use javascript on say a link or a input field's OnBlur()
event to open another window, process some PHP in there then close the
new window.  But the original page won't budge unless you force a

I have used flying screens but only for access to a
search-a-table-then-select-box for inputting.  eg The
searchable/sortable product catalogue listing opens up _if_ the focus
reaches a suitable input.  Or alternatively it can be used to validate
input before submitting the whole screen.  Combine the two if you want
to do something like:  (1) Pick this product (2) Select delivery options
(2a) Validate delivery option is suited to product (3) More input...
(4)Submit.  However it is a fiddle with lots of things to go wrong and
you may be better redesigning the sequence.

I've written an article on the subject of flying screens with some
examples which I could send you on request.

PETER FOX Not the same since the borehole business dried up
2 Tees Close, Witham, Essex.
Gravity beer in Essex  <http://www.eminent.demon.co.uk

Site Timeline