update without reloading browser

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J. J. Cale

    update without reloading browser

    Hi
    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?
    TIA
    Jimbo


  • noSpam

    #2
    Re: update without reloading browser

    J. J. Cale wrote:[color=blue]
    > Hi
    > 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?
    > TIA
    > Jimbo
    >
    >[/color]
    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.

    Comment

    • Peter Fox

      #3
      Re: update without reloading browser

      Following on from J. J. Cale's message. . .[color=blue]
      >Hi
      > 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?
      >TIA
      >Jimbo
      >
      >[/color]
      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
      reload.

      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
      peterfox@eminen t.demon.co.uk.n ot.this.bit.no. html
      2 Tees Close, Witham, Essex.
      Gravity beer in Essex <http://www.eminent.dem on.co.uk>

      Comment

      • Berislav Lopac

        #4
        Re: update without reloading browser

        noSpam wrote:[color=blue]
        > J. J. Cale wrote:[color=green]
        >> Hi
        >> 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?
        >> TIA
        >> Jimbo
        >>
        >>[/color]
        > 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.[/color]

        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.

        HTH,

        Berislav


        Comment

        • noSpam

          #5
          Re: update without reloading browser

          Berislav Lopac wrote:[color=blue]
          > noSpam wrote:
          >[color=green]
          >>J. J. Cale wrote:
          >>[color=darkred]
          >>>Hi
          >>> 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?
          >>>TIA
          >>>Jimbo
          >>>
          >>>[/color]
          >>
          >>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.[/color]
          >
          >
          > 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.
          >
          > HTH,
          >
          > Berislav
          >
          >[/color]

          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.

          Comment

          Working...