crossProbe setTarget property.


cp.setTarget
cp.setTarget = [ layer/document reference as string ]
default target: current document


The setTarget property is still in a experimental state and has not been yet subject to extensive testing. It can be set to tell buildObject method where to draw the object HTML. You cannot just invent some layer/frame - name here or you will get an error code 5 shot at you, it must contain a valid frame / layer reference. To make this problem a little more managable, any reference here goes stringified and will be queued up and processed by the window.onLoad event. This means you can target a layer that has not yet been drawn, but it must exist when the onLoad event goes off.
Example "Draw to layer" ( note the quotations...)
layer = cp.isIE ? "document.all.myLayer":"document.layers.myLayer";
cp.setTraget = layer;

You should also have a look at the powerful createLayer - method when working with layerered targets. It does not not only take care of browser issues like in the previous example, it also creates layers dynamically (!) just by syntaxing;
cp.setTarget = cp.createLayer( );

This will build and draw the neccessary HTML to your document needed for a new layer, then all you have to do is using buildObject or buildSandwich as usual to put you custom HTML into it.

(see The SampleArea for examples.)
Reference Index.