Welcome Guest, Not a member yet? Register   Sign In
creating a delay
#11

(This post was last modified: 07-09-2021, 09:37 AM by richb201.)

Related to this issue, I broke out the section of the report with the problem. It seems to work fine on the first try. But when I change the taxyear, it doesn't repopulate the table. But then if I F5 I get a 'confirm form resubmission' and if I press continue, the table on my report populates correctly with the new taxyear.  Here is my code for changing the taxyear on the report.

if (isset($_POST['taxyear']))
    $_SESSION['last_TY']=$_POST['taxyear'];
HERE
?>
<?php
echo "<br><br><br><br><br><br><h3>Nexus Report for:  ".$_SESSION['campaign']." for tax year ended ".$_SESSION['last_TY'];
?>
Is there anyway I could force a browser refresh by placing something where I have the word HERE, with proper brackets of course? I wish I could show an image of the page where I have a taxyear pulldown and the 'change tax year' button.
proof that an old dog can learn new tricks
Reply
#12

(This post was last modified: 07-10-2021, 07:54 AM by richb201.)

Bottom line is that I don't need a delay. What I need is a way to force a form submission.

Will this possibly work?

Code:
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0");
proof that an old dog can learn new tricks
Reply
#13

(This post was last modified: 07-11-2021, 08:47 AM by Gary.)

(07-10-2021, 05:57 AM)richb201 Wrote: Bottom line is that I don't need a delay. What I need is a way to force a form submission.

Will this possibly work?

Code:
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0");

I'm not sure how much distance you'll get out of this... it's a page refresh... which is being generated at the server-end when the page is being created... so why not just prep the page with the correct material before sending it the first time (?).

To be fair, I've not read the whole thread... but if you want something modified when something is clicked or selected, you could try using onchange='whatever.you.want.done' as one of the properties of the tag:
Code:
<select id="country_1" class="country-inject custom-select" name="addr_1_country" onchange='sub("CountryState/fetch_states", "insert_id|state_li... >
...
</select>
Reply
#14

(07-10-2021, 05:57 AM)richb201 Wrote: Bottom line is that I don't need a delay. What I need is a way to force a form submission.

Will this possibly work?

Code:
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0");

Answer: No, that did not work.
proof that an old dog can learn new tricks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB