bounce

### Index Up << >>

## bounce

CALL INFORMATION
  Parameters: href if

  Positional parameters in same order.

  Pass attribute hash as last to subroutine: no

  Must pass named parameter interpolate=1 to cause interpolation.

  Invalidates cache: no

  Called Routine:

  ASP/perl tag calls:

          $Tag->bounce(
              {
               href => VALUE,
               if => VALUE,
              }
          )

       OR

          $Tag->bounce($href, $if);

DESCRIPTION
  The [bounce ...] tag is designed to send an HTTP redirect (302 status code) to the browser and redirect it to another (possibly MiniVend-parsed) page.

  It will stop MML code execution at that point; further tags will not be run through the parser. Bear in mind that if you are inside a looping list, that list will run to completion and the [bounce] tag will not be seen until the loop is complete.

  Example of bouncing to a MiniVend parsed page:

              [if !scratch real_user]
              [bounce href="[area violation]"]
              [/if]

  Note the URL is produced by the `[area ...]` MML tag.

  Since the HTTP says the URL needs to be absolute, this one might cause a browser warning:

              [if value go_home]
              [bounce href="/"]
              [/if]

  But running something like one of the MiniVend demos you can do:

              [if value go_home]
              [bounce href="__SERVER_NAME__/"]
              [/if]

              [if value go_home]
              [bounce href="/"]
              [/if]

### Index Up << >>