Reload.

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

    Reload.

    Hello,

    I have the following problem. Using php I have composed a file which
    add to an html file text typed into text-field. Problem is that I can
    see new conntent of html file only after pressing "reload" button of
    browser. My question is whether I can add some fragment to the html
    file to force it to reload atomatically? Pleas help me if you can.

    Thank you in advance.
  • Andy Hassall

    #2
    Re: Reload.

    On 24 Nov 2004 14:26:56 -0800, opt_inf_env@yah oo.com (Q) wrote:
    [color=blue]
    >I have the following problem. Using php I have composed a file which
    >add to an html file text typed into text-field. Problem is that I can
    >see new conntent of html file only after pressing "reload" button of
    >browser. My question is whether I can add some fragment to the html
    >file to force it to reload atomatically? Pleas help me if you can.[/color]

    No, you cannot _force_ reloading of a page. If you want reaction to user input
    without reloading and sending a new request to the server, you probably want
    Javascript, not PHP. If you want PHP to handle it, you wait until the user
    either reloads, clicks a link, or submits a form to the server.

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • Sacs

      #3
      Re: Reload.

      Q wrote:[color=blue]
      > Hello,
      >
      > I have the following problem. Using php I have composed a file which
      > add to an html file text typed into text-field. Problem is that I can
      > see new conntent of html file only after pressing "reload" button of
      > browser. My question is whether I can add some fragment to the html
      > file to force it to reload atomatically? Pleas help me if you can.
      >
      > Thank you in advance.[/color]

      What about:

      <input type=text onchange="submi t();">

      Comment

      • Tony Clarke

        #4
        Re: Reload.

        You can use timeouts in javascript to redirect the page to itself after x
        amount of time. Or just redirect first time it loads. Something like

        <script language="javas cript" type"text/javascript">
        var counter =0;
        x=window.setTim eout("update(); ",2000); //2000 is roughly 2 seconds

        function update(){
        window.location .reload();
        }
        </script>


        "Q" <opt_inf_env@ya hoo.com> wrote in message
        news:5f275cd6.0 411241426.364f5 7e9@posting.goo gle.com...[color=blue]
        > Hello,
        >
        > I have the following problem. Using php I have composed a file which
        > add to an html file text typed into text-field. Problem is that I can
        > see new conntent of html file only after pressing "reload" button of
        > browser. My question is whether I can add some fragment to the html
        > file to force it to reload atomatically? Pleas help me if you can.
        >
        > Thank you in advance.[/color]


        Comment

        Working...