DFrame: setTarget

DFrame: getTarget

DFrame: setMultipleTarget

setTarget method: Indicate the function that will create the DFrame that will be the target for links.

getTarget method: Return the target of the DFrame, if exists.

setMultipleTarget method. Indicate if a new target DFrame has to be created for each clicked link of the DFrame.

Demo

file: setTarget.html

Run the example
See the source code

Syntaxes

DFrame.setTarget(functionName)

DFrame.getTarget()

DFrame.setMultipleTarget(flag)

Parameters

functionName

The name of the function wich creates the target DFrame.

It MUST return a DFrame object.

IMPORTANT: The string indicated as the functionName will be run thru the eval function of JavaScript:

It MUST include parenthesis:

dFrame.setTarget('someFunction()')

It can include parameters, with double quotes for string delimitations:

Frame.setTarget('someFunction("someParameter")')

flag

setMultipleTarget method. Boolean:
true: One DFrame is created for each click on a link of the DFrame.
false: The same DFrame is used for all links.

Return value

setTarget and setMultipleTarget methods: no return value

getTarget method: String. The name of the function.

Usage

If the setTarget method is not used links of a DFrame will open in the DFrame.

This method can be used in the same way as the <TARGET> HTML tag and redirect links to another DFrame.

The function referenced by the setTarget method MUST return a DFrame object: Do not forget the return dFrame instruction at the end of this function.