MIFrame

From HTML5 Builder
Jump to: navigation, search

The MIFrame component is a frame, a container inside your page where you can load another webpage.

Configuration

You can define the webpage to load whithin the frame using the Source property.

Usage

Specify the Source Dynamically

To change the webpage loaded whithin the frame from PHP, modify the Source property of the frame: $this->ComponentName->Source = "http://www.example.com";.

You can change the loaded webpage from JavaScript as well: $("#ComponentName").attr("src", "http://www.example.com");.

Deployment

iOS

When users follow an external link on your mobile application, by default it will be loaded in a new page inside PhoneGap web browser. The problem is PhoneGap web browser has no controls, hence users will not be able to get back to the previous page.

This can be solved by setting your application up so external links are open in device’s default web browser instead. The problem with that is that MIFrame component will stop working as expected, and its Source property will be treated as a simple external link.

You should carefully consider the cons and pros before you decide how to proceed.

Client-side Features

DOM Elements

The component generates the following client-side DOM elements:

  • Wrapper (HTMLDivElement). Full web browser support. Access it with $("#ComponentName_outer").get()[0].
    • Main element (HTMLIFrameElement). Full web browser support. Access it with: $("#ComponentName").get()[0].

Client-side Events

Documented in the RPCL Reference.

Server-side Features

Properties, Methods and Events

Documented in the RPCL Reference.

Help Resources

Tutorials