KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: When SEND HTML FILE executes
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: June 15, 2001

The command SEND HTML FILE does not cause an HTML file to be sent out at the moment the command is called. Rather, it is sent out automatically by 4D at the end of the execution chain. An alternative name for this command would be "SET WEB RESPONSE FILE". Examine the following:

ALL RECORDS([Table])
SEND HTML FILE("TableTest.shtm")
REDUCE SELECTION([Table];0)

If the "TableTest.shtm" document contained a 4DLOOP tag such as:

<!--4DLOOP [Table]--> : This kind of argument was not expected here.

You would expect that 4DLOOP would be executed for as many records as there are in [Table]. However, that is not the case. The file will only be parsed and sent at the end of the execution chain, so the 4DLOOP on [Table] would never execute, since there won't be any records in the selection of [Table] at the end of the execution chain.