crossProbe createLayer method.


cp.createLayer([optional; name])
cp.setTarget = cp.createLayer( )
Requires Javascript 1.2

Method createLayer gives you new possibilities when it comes to drawing content to the document. When invoked it will tell crossProbe to prepare a "layer" as target for the media-object. You can create a target in this manner both when the page is parsing and any time after. You don't have to bother anymore with all crossbrowser issues coming along when working with layers, crossProbe will do this for you.

Since there always has to be some sort of default behavior set to objects, these properties are assigned to every layer created with this method;
* position: absolute.
* visibility: hidden.
* top: 0px
* left: 0px.

Argument 1; would be any alphanumeric name you want to assign this target, if suppressed crossProbe will name it for you, which in most cases are easier, since you don't really need to know its name.
  The target-object or layer is accessible at anytime after the document is loaded thru
[crossprobe-instance].target, so if you, let's say want to make this target visible at a certain point the syntax would be;
for MSIE 4+; cp.target.style.visibility = 'visible'
for NS4+; cp.target.visibility = 'show'

and crossbrowser;
var myTarget = cp.isIE ? cp.target.style : cp.target;
myTarget.visibility = cp.isIE =? 'visible' : 'show'


Since the crossProbe is designed to ease things up thru the whole proccess of publishing, there is ofcourse a special method available for making these crossbrowser issues of positioning and visualisation a pieceocake problem, namely placeTarget

<NOTE> createLayer will NOT create a new target, only prepare a reference for it. The layer-element creation will occur within the buildObject or buildSandwich depending on which of them you use. </NOTE>

Reference Index.