Step 1 Step 2 Step 3.1
Step 3.2
Step 3.3

Step 4.1
Step 4.2

Step 3.3
Clothing - Static HTML with DATA attribute initialization. Data access techniques (3) - load the label using script.

Load label:
Data record Printing
     Read below first!

Here we do not load anything in the label at first. Instead we load the label using Javascript in the page. In this case this is represented by the onClick events of the buttons "Label1" and "Label2". The "Clear label" button just resets the label to initial empty state.

The labels we load may contain or may not contain data in their internal cache, we can load a static label file or refer a server side script that generates the label and perhaps its data and so on. In other words it is possible to use whatever source we need.

This is done by simple setting the VisiLabel's Src property to an URL (VisiLabel is the root object in the Active Label ActiveX object model). In the sample we use relative paths, but we can use full URL as well. Ok lets demonstrate this too: This button loads a label from our WEB site (If it doesn't work make sure you are connected to the Internet). Note something interesting about the label when it loads - the images will fail to load - why? The answer is simple they are linked relatively to the label location and Active Label ActiveX when embedded on a WEB page assumes that its location is the page's location and not the label source location! When not hosted in the browser (for example in the Active Label Browser or in an application you built) there is not page and the label assumes that its source location is the base location. This behavior is discussed in other samples and the documentation and is intended to minimize the developer's work in the both cases - in WEB applications where the work is centered most often around the page and in a custom Windows application where the label must behave like a browser on its own. If you want an online label to open correctly everywhere you will need to specify full URL in each image Src property/parameter.

This approach is good for scenarios in which the client side of the label management can be implemented in a single page for example. Then you can load the labels from their respective locations, sometimes load them from an URL of a server side script, passing some parameters to it and so on. Generally this looks like a method good for situations in which the label printing is put a bit aside of the main application functionality.