{ WebProperty=Client } Property String psUrl
Web Property Read Access: | WebGet psUrl to StringVariable |
Web Property Write Access: | WebSet psUrl to StringVariable/Value |
Read Access: | Get psUrl to StringVariable |
Write Access: | Set psUrl to StringVariable/Value |
Set psURL to the URL of the content you wish to insert in the IFrame.
Object oIFrame is a cWebIFrame Set psUrl to "PDFs/LumberCatalog.pdf" //... End_Object
In the above example, the URL represents a file (LumberCataLog.pdf) located in the PDFs sub folder of the web application's URL. Any file that is located in the web application's URL (or a sub folder) can be referenced in this way.
Object oIFrame is a cWebIFrame Set psUrl to "http://www.dataaccess.com/PDFs/LumberCatalog.pdf" //... End_Object
In the above example, the entire URL to a file (LumberCataLog.pdf) is specified. This file may be located in any reachable URL.
Object oInventory is a cWebView Set psCaption to "Inventory Browser" Set piColumnCount to 3 Set pbClearAfterSave to False Set piWidth to 750 Object oInvt_DD is a Invt_DataDictionary End_Object Set Main_DD to oInvt_DD Set Server to oInvt_DD Object oItem_ID is a cWebForm Set psLabel to "Stock Code:" Entry_Item Invt.Item_ID End_Object Object oDescription is a cWebForm Set psLabel to "Description:" Set piColumnIndex to 1 Set piColumnSpan to 2 Entry_Item Invt.Description End_Object Object oCatalog is a cWebIFrame Set piHeight to 500 Set psUrl to "Catalogs/LumberCatalog.pdf" End_Object Object oPaversBtn is a cWebButton Set psCaption to "Show Pavers" Procedure OnClick WebSet psURL of oCatalog to "Catalogs/PaversCatalog.pdf" End_Procedure End_Object End_Object
The above example demonstrates a web view with two web forms for browsing data from the Inventory table. Below this, an IFrame is used to embed a .pdf file (LumberCataLog.pdf) located in the Catalogs sub-folder of the web application's URL. This is followed by a web button. The button's OnClick event uses the WebSet command to change the .pdf file displayed in the IFrame.
This example also demonstrates the use of the Set command, to set the design-time value of psURL, and the WebSet command to change the local value of psURL for the client that made the OnClick call.
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.