I have a form that begins like this:

PHP Code:
<?php echo zen_draw_form('checkout'zen_href_link(FILENAME_CHECKOUT'''SSL'), 'post', ($flagOnSubmit 'onsubmit="return check_form();"' '')) . zen_draw_hidden_field('action''process'); ?>
When the form submits, the validator checks to see if $_POST['action'] == 'process'.

This form includes calculations that I want to be updated in real-time when a shipping selection is made. So, I have included in the selections: onClick="checkout.submit()"

Now, if the action is process, then the page is redirected to checkout_confirmation. I want to pass to assign a value to a variable when onClick occurs that changes action to not equal process, or at the very least, stop the redirect.

I'm a beginner with javascript so I'm unsure of what I can or can't do. Ultimately, I would like something like this:

PHP Code:
onClick="setVariable($refresher = true)"
 
if ($refresher == true) {
  
process everything without redirect;
} else {
  
redirect;

Any ideas?