Page

From HTML5 Builder
Jump to: navigation, search

The Page component is a top-level container for a webpage.

Properties

PHP Properties

Caption

The title of the webpage, usually rendered in the web browser window title, or the tab title.

Events

PHP Events

OnShowHeader

To write on the head of a Page, define an event handler for this method and use it to print anything you want. For example:

function Page1ShowHeader($sender, $params)
{
  ?>
    <!-- Include an external JavaScript file: -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <!-- Include JavaScript code directly: -->
    <script type="text/javascript">
      alert("Hello");
    </script>
  <?php
}
Note: Instead of writing JavaScript code directly on the header, you should use Page’s OnLoad event.

OnStartBody

You can use this event to print HTML code right at the beginning of the body element.

JavaScript Events

OnLoad

This event is triggered once the webpage is completely loaded on the web browser. You can assign it an event handler where you print JavaScript code that needs all the content on the page to be available.

Personal tools