ADX Content type object

Available from version 5.3.3.

The ADX Content type object represents an ADX Content defined in the ADX. This object is accessible through the CurrentADC.Contents[ index ] / CurrentADP.Contents[ index ] properties or the CurrentADC.GetContent( Location ) / CurrentADP.GetContent( location ) methods.

See also:

In this topic:

 

Properties

Type

Returns the type of the ADX Content. Possible types are:

Returns a String.

Examples
CurrentADC.Contents[1].Type ' => "image"
CurrentADP.Contents[1].Type ' => "image"

↑ Top of page ↑

FileName

Returns the file-name associated with the ADX Content.

Returns a String.

Examples
CurrentADC.Contents[1].FileName ' => "IE-gender-with-fx.css"
CurrentADP.Contents[1].FileName ' => "styles.css"

↑ Top of page ↑

Mode

Returns the mode of the ADX Content. Possible modes are:

Returns a String.

Examples
CurrentADC.Contents[1].Mode' => "static"
CurrentADP.Contents[1].Mode' => "dynamic"

↑ Top of page ↑

Position

Returns the position of the ADX Content. Available positions are:

Returns a String.

Examples
CurrentADC.Contents[1].Position ' => "head"
CurrentADP.Contents[2].Position ' => "foot"

↑ Top of page ↑

Methods

ToURL()

Returns the final relative URL to the ADX content file. This is a shorthand for the following method:

CurrentADC.URLTo(CurrentADC.Contents[_index_].Mode + "/" + CurrentADC.Contents[_index_].FileName)

Returns a String.

Examples
CurrentADC.Contents[1].ToURL() 
' => "../Resources/[Survey]/[ADC]/style.css" 
CurrentADC.Contents[1].ToURL()
' => "../Resources/[SurveyName]/jquery.js"
CurrentADC.Contents[1].ToURL()
' => "AskiaExt.dll?Action=GetADCContent
'          &SurveyName=TestSurvey
'          &Intvw=BNYOXYCYVIUJDBBD
'          &Position=4
'          &ADCName=GenderADC
'          &InstanceId=1
'          &Content=dynamic/default.js"

↑ Top of page ↑

ToText()

Returns the file content of the ADX content. This method evaluates all embedded AskiaScript when the file is dynamic. It returns an empty string if the file is binary ("binary", "video", "audio", "image", "flash").

Returns a String.

Example
CurrentADC.Contents[1].ToText() ' => ".tickColor { background: #ff00ff; }"

↑ Top of page ↑

ToString()

Returns a representation of the ADX content in JSON notation.

Returns a String.

Example
CurrentADC.Contents[1].ToString() ' => {
  "fileName":"tickColor.png",
  "type":"image",
  "mode":"static",
  "position":"placeholder" 
}

↑ Top of page ↑

TypeOf()

Always returns "adx-content".

Returns a String.

Examples
CurrentADC.Contents[1].TypeOf() ' => "adx-content"
CurrentADP.Contents[1].TypeOf() ' => "adx-content"

↑ Top of page ↑

Create your own Knowledge Base