Connecting Tech Pros Worldwide Help | Site Map

refresh and submit

  #1  
Old July 17th, 2005, 09:40 AM
Noel Wood
Guest
 
Posts: n/a
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


  #2  
Old July 17th, 2005, 09:40 AM
Christopher-Robin
Guest
 
Posts: n/a

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.


  #3  
Old July 17th, 2005, 09:41 AM
Matthewtung
Guest
 
Posts: n/a

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
http://yourhost.com/process.php?step=1&var=1


  #4  
Old July 17th, 2005, 09:41 AM
steve
Guest
 
Posts: n/a

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
  #5  
Old July 17th, 2005, 09:45 AM
Jon Beckett
Guest
 
Posts: n/a

re: refresh and submit


On Sun, 19 Sep 2004 16:07:24 +1000, "Noel Wood"
<elwoodREMOVE@optusnet.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@pluggedout.com)
working on : http://www.pluggedout.com/penpals
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
select box - using refresh to select same item twice entfred@hotmail.com answers 2 July 26th, 2006 12:45 AM
Implicit calling of Submit button on Page Refresh. Ibrahim. answers 1 June 27th, 2006 01:45 PM
Refresh the Page laura answers 6 July 22nd, 2005 03:28 AM
refresh on submit kindermaxiz@yahoo.com answers 7 July 17th, 2005 09:51 AM