Copyright 2008 Shoptalk Systems

WAIT

Description:

The WAIT statement causes a program to stop and wait for user interface interaction in the web browser.

Any output produced using PRINT, HTML, HEAD statements and any widgets added like links, buttons, fields, etc. before a WAIT statement will appear in the user's web browser when the WAIT statement is reached.  The user must then click on a link, button, etc. to cause further program execution to occur.

Example:

  print "Link tester"
  link #testIt, "Click to test me", [linkAction]
  print
  wait

[linkAction]
  print "Test successful!  Try again."
  wait

Notice there are two WAIT statements.  The first one causes the program to wait for user interaction after the program starts up, and the second one cause the program to wait after the user clicks on the "Click to test me" link is "Test successful! Try again." is displayed.  The program is not finished executing after this happens because the program is again waiting.  The user can click on the "Click to test me" link more than once and the [linkAction] routine will be executed each time.