Logo of RobustHost, developer of high quality webmaster tools.
Home About Us Contact Us Support Download Products
DynAds Basic banner ad rotation and tracking script
DynAds
Main Page
Features
Demo & Test
Documents
F.A.Q.
 
Order Online
 
Related Products
DynAds Pro
 
Testimonials
 

Sample Testimonial
Just wanted to let you know, now that we got past the learning curve everything is going wonderfully! Thanks for such a GREAT product!!!
Garry & Kacy, HardEngineering.com More...

Affiliates

Ad Group (AdGrp) Class

AdGrp class is a class for handling and managing a group of ads or contents. When an ad group is loaded to the browser as a DAG object from DynAds database, all AdGrp objects are created automatically.

AdGrp Class: Class for managing multiple ads as a group.
AdGrp.NewAd Method: Create a new Ad object and append it to the internal ad list
AdGrp.RandIndex Method: Generates a random integer value between 0 and one less the number of ads in the object.
AdGrp.WRandIndex Method: Generates a weighted random integer value between 0 and one less the number of ads in the object.
AdGrp.RandAd Method: Selects one of the ads in the group randomly.
AdGrp.WRandAd Method: Selects one of the ads in the group weighted randomly.
AdGrp.isAdGrp Property: Check if this object is an AdGrp object. isAdGrp property is always true for an AdGrp object.
AdGrp.ads Property: Array of the ads in the group. Each element of the ads array is an Ad object.
AdGrp.length Property Number of ads in the AdGrp object.

AdGrp Class
Definition: Class for managing multiple ads as a group.
Syntax: new AdGrp() ;
new AdGrp(anotherAdGrpObject) ;
Arguments: None: An empty AdGrp is created.
anotherAdGrpObject: A copy of anotherAdGrpObject is created.
Returns: A new AdGrp object.
Remarks: The properties of AdGrp class can be accessed freely.
Example:
// Create a new AdGrp object
var myAdGrp = new AdGrp() ;

AdGrp.NewAd Method
Definition: Create a new Ad object and append it to the internal ad list
Syntax: function AdGrp.NewAd () ;
function AdGrp.NewAd (anotherAdObject) ;
function AdGrp.NewAd (category, name, hhtml, fhtml, link, rlink, weight) ;
Arguments: None: An empty Ad object is created.
anotherAdObject: Create a copy of anotherAdObject.
category, name, hhtml, fhtml, link, rlink, weight: Properties of the new Ad object.
Returns: None.
Remarks: None.
Example:
var myAdGrp = new AdGrp() ;
myAdGrp.NewAd("Category1", "ShortAd", ...) ;

AdGrp.RandIndex Method
Definition: Generates a random integer value between 0 and one less the number of ads in the object.
Syntax: function AdGrp.RandIndex () ;
Arguments: None.
Returns: Returns the random number generated.
Remarks: Random number is generated uniformly.
Example:
var index = myAdGrp.RandIndex() ;

AdGrp.WRandIndex Method
Definition: Generates a weighted random integer value between 0 and one less the number of ads in the object.
Syntax: function AdGrp.WRandIndex () ;
Arguments: None.
Returns: Returns the random number generated.
Remarks: Random number is generated weighted with the weights of the ads in the group.
Example:
var windex = myAdGrp.WRandIndex() ;

AdGrp.RandAd Method
Definition: Selects one of the ads in the group randomly.
Syntax: function AdGrp.RandAd () ;
Arguments: None.
Returns: Returns the selected Ad object.
Remarks: Random number is generated uniformly.
Example:
var rndad = myAdGrp.RandAd() ;

AdGrp.WRandAd Method
Definition: Selects one of the ads in the group weighted randomly.
Syntax: function AdGrp.WRandAd () ;
Arguments: None.
Returns: Returns the selected Ad object.
Remarks: Random number is generated weighted.
Example:
var wrndad = myAdGrp.WRandAd() ;

AdGrp.isAdGrp Property
Definition: Check if this object is an AdGrp object. isAdGrp property is always true for an AdGrp object.

AdGrp.ads Property
Definition: Array of the ads in the group. Each element of the ads array is an Ad object.

AdGrp.length Property
Definition: Number of ads in the AdGrp object.


Copyright © 2003, RobustHost.com. All Rights Reserved.