This is going to sound stupid but... Reload PHP without reloading page?

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

    This is going to sound stupid but... Reload PHP without reloading page?

    Something like a php function that can be called? I have php in a
    page that needs to be update periodically (basically poll results)
    without reloading the page around it (I do have a button you can
    click). Is this possible? Or should I make some sort of Iframe with
    the php page in it that could be reloaded.

    The php code basicaly just writes a table to the page with the results
    of the polls included. Thanks for the help.
  • Shakotah

    #2
    Re: This is going to sound stupid but... Reload PHP without reloadingpage?

    jbj wrote:[color=blue]
    > Something like a php function that can be called? I have php in a
    > page that needs to be update periodically (basically poll results)
    > without reloading the page around it (I do have a button you can
    > click). Is this possible? Or should I make some sort of Iframe with
    > the php page in it that could be reloaded.
    >
    > The php code basicaly just writes a table to the page with the results
    > of the polls included. Thanks for the help.[/color]

    Once you output to the browser it has control, the server can't initiate
    anything else unless you have some client side interface (curl,
    javascript, activex, java, flash, etc ...) that takes care of the updating.

    So either a <meta refresh ..>, javascript or a button to reload the
    page as needed. Your Idea about the Iframe (frame or layer) might be the
    best approach.

    Hope to have helped!

    Comment

    • Jamie Isaacs

      #3
      Re: This is going to sound stupid but... Reload PHP without reloadingpage?

      jbj wrote:[color=blue]
      > Something like a php function that can be called? I have php in a
      > page that needs to be update periodically (basically poll results)
      > without reloading the page around it (I do have a button you can
      > click). Is this possible? Or should I make some sort of Iframe with
      > the php page in it that could be reloaded.
      >
      > The php code basicaly just writes a table to the page with the results
      > of the polls included. Thanks for the help.[/color]

      An Iframe is you best bet. You can have it automatically refresh
      whenever you want with javascript.
      -JI

      Comment

      • Ilija Studen

        #4
        Re: This is going to sound stupid but... Reload PHP without reloadingpage?

        jbj wrote:[color=blue]
        > Something like a php function that can be called? I have php in a
        > page that needs to be update periodically (basically poll results)
        > without reloading the page around it (I do have a button you can
        > click). Is this possible? Or should I make some sort of Iframe with
        > the php page in it that could be reloaded.
        >
        > The php code basicaly just writes a table to the page with the results
        > of the polls included. Thanks for the help.[/color]

        Try this: http://www.ashleyit.com/rs/techniques.htm

        Comment

        Working...