Opening a web page
There could be a need for you to open a web page within your mobile app. You are not likely to create a new mobile browser using LiveCode; however, LiveCode does provide basic functionality for you to be able to display web pages in your mobile apps. In this recipe, you will learn how to open and display a web page within your mobile application using LiveCode.
How to do it...
Follow the steps in this recipe to create a mobile app that opens a web page:
- Open LiveCode and create a new main stack.
- Using the Standalone Application Settings dialog window, enable the landscape rotation of your selected mobile device.
- Create a group on your card with the following specifications:
- Name:
Browser
- Width:
312
- Height:
390
- Location:
160
,225
- Name:
- Create a text input field on your card with the following specifications:
- Name:
fld_URL
- Width:
312
- Height:
23
- Location:
160
,15
- Name:
- Add the following code to the card:
local browserID on preOpenCard mobileControlCreate "browser" put the result into...