refresh and submit

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

    refresh and submit

    Hello,
    I have a problem that I'm sure is simple but I have searched the newsgroup
    and have not found it posted before so I apologize if it has been asked
    heaps of times before.
    I have a page that list all current orders from customers. Customers can
    order at any time. I have a checkbox beside each listing so that as each
    order is complete it can be ticked off. I want the page to refresh every 2
    mins so I have added ....
    <meta http-equiv="Refresh" content="120" />
    this will enable me to see new orders. However I will lose the information
    from the check boxes telling me which orders are completed if I have not
    pressed the submit button first. Is there a standard way around the
    refresh/submit problem? Can anybody offer suggestions?
    Thanks for your help.
    Noel


  • Christopher-Robin

    #2
    Re: refresh and submit

    <meta http-equiv="Refresh" content="120" />

    This meta-tag refreshes the page, but does not submit any form. This does't
    work, because the browser (that refreshes the page), cannot know which form
    to submit - if any - when there are more then one, so the refresh won't work
    for data-submits.

    Well, the solution is to write a JScript/JavaScript, that submits the form
    every once in a while, and reloads the page this way.


    Comment

    • Matthewtung

      #3
      Re: refresh and submit

      Transfer all the $_POST varaibles to $_GET varaibles will be good enough if
      the security requirment is not high...e.g. not using refresh, but redirect
      to something like



      Comment

      • steve

        #4
        Re: refresh and submit

        "Noel Wood1" wrote:[color=blue]
        > Hello,
        > I have a problem that I'm sure is simple but I have searched
        > the newsgroup
        > and have not found it posted before so I apologize if it has
        > been asked
        > heaps of times before.
        > I have a page that list all current orders from customers.
        > Customers can
        > order at any time. I have a checkbox beside each listing so
        > that as each
        > order is complete it can be ticked off. I want the page to
        > refresh every 2
        > mins so I have added ....
        > <meta http-equiv="Refresh" content="120" />
        > this will enable me to see new orders. However I will lose
        > the information
        > from the check boxes telling me which orders are completed if
        > I have not
        > pressed the submit button first. Is there a standard way
        > around the
        > refresh/submit problem? Can anybody offer suggestions?
        > Thanks for your help.
        > Noel[/color]

        I suggest you have two frames. Once with boxes you can check, and the
        other one listing orders. The one listing orders would have
        auto-refresh.

        The one with checkboxes would be refereshed only upon hitting the
        submit button. This way, you can issue submit at your own leisure
        while seeing what new orders are being added.

        Another option:
        There may be a way with javascript to have a form submit automatically
        upon selection of a checkbox. This would obviously slow down the
        browser response (due to refresh on every box selection), but it *may*
        be another option.

        --
        http://www.dbForumz.com/ This article was posted by author's request
        Articles individually checked for conformance to usenet standards
        Topic URL: http://www.dbForumz.com/PHP-refresh-...ict151189.html
        Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=506650

        Comment

        • Jon Beckett

          #5
          Re: refresh and submit

          On Sun, 19 Sep 2004 16:07:24 +1000, "Noel Wood"
          <elwoodREMOVE@o ptusnet.com.au> wrote:
          [color=blue]
          >Hello,
          >I have a problem that I'm sure is simple but I have searched the newsgroup
          >and have not found it posted before so I apologize if it has been asked
          >heaps of times before.
          >I have a page that list all current orders from customers. Customers can
          >order at any time. I have a checkbox beside each listing so that as each
          >order is complete it can be ticked off. I want the page to refresh every 2
          >mins so I have added ....
          ><meta http-equiv="Refresh" content="120" />
          >this will enable me to see new orders. However I will lose the information
          >from the check boxes telling me which orders are completed if I have not
          >pressed the submit button first. Is there a standard way around the
          >refresh/submit problem? Can anybody offer suggestions?
          >Thanks for your help.
          >Noel
          >[/color]

          You can submit forms with client-side javascript (people commonly do
          it to to use a graphic instead of a submit button in forms).



          Jonathan Beckett (jonbeckett@plu ggedout.com)
          working on : http://www.pluggedout.com/penpals

          Comment

          Working...