Class Index | File Index

Classes


Class TIFrameRotator

The TIFrameRotator object is used to rotate several URLs in an IFRAME based on their priority.
Defined in: <class.iframerotator.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
TIFrameRotator(width, height)
Construct a new TIFrameRotator object.
Field Summary
Field Attributes Field Name and Description
 
Properties used when creating new IFRAME object via #Create.
Method Summary
Method Attributes Method Name and Description
 
AddURL(url, priority)
Adds another URL for rotation within the IFRAME
 
Attach(idIframe)
Attach already existing IFRAME DOM object to this class.
 
Create(owner, idName)
Create new IFRAME DOM object under specified "owner".
 
DOM object of IFRAME
 
Show next URL within IFRAME (Based on weighted priority specified with #AddURL).
Class Detail
TIFrameRotator(width, height)
Construct a new TIFrameRotator object.
Parameters:
{int} width
[Optional] The width of the IFRAME in pixels. (Only used if #Create is called)
{int} height
[Optional] The height of the IFRAME in pixels. (Only used if #Create is called)
Field Detail
{array} properties
Properties used when creating new IFRAME object via #Create.
Possible properties to set:
var iframe = TIFrameRotator();
iframe.properties["width"] = 300;
iframe.properties["height"] = 250;
iframe.properties["scrolling"] = "no";
iframe.Create(document.body, "idAd300x250");
Method Detail
AddURL(url, priority)
Adds another URL for rotation within the IFRAME
Parameters:
{string} url
URL to content to display within IFRAME.
{int} priority
The weighted priority of the content which must be a value > 0.

An URL with a priority of 80 will display twice as much as an URL with a priority of 40, and 4 times as much as an URL with a priority of 20. The priority can thus be very useful - for example in displaying higher paying advertisement code more often.


Attach(idIframe)
Attach already existing IFRAME DOM object to this class. (See #Create for dynamically creating IFRAME objects)
Parameters:
{string/object} idIframe
DOM object or DOM object ID of IFRAME to attach.

Create(owner, idName)
Create new IFRAME DOM object under specified "owner". (See #Attach for attaching existing IFRAME objects)
Note that IFRAME properties are assigned from #properties. You must change the properties BEFORE calling Create for them to apply. Changing them after Create will have no effect. (You can still change the properties directly on the DOM object retrieved via #getIframe).
Parameters:
{string/object} owner
DOM object or DOM object ID under which to create IFRAME DOM object as child.
{string} idName
The IFRAME's DOM ID.

{DOM_Object} getIframe()
DOM object of IFRAME
Returns:
{DOM_Object} Returns DOM object of created/attached IFRAME.

Rotate()
Show next URL within IFRAME (Based on weighted priority specified with #AddURL).

©2008 - Spacial Audio Solutions, LLC
Documentation generated by JsDoc Toolkit 2.0.2 on Mon Apr 20 2009 17:57:05 GMT+0200 (SAST)