Javascript Ad Calls
Here are a list of ad calls you can make
| Create Only | Create and Fetch | Description |
| CreateZone(placementHandle[, medium, parentId]) | DisplayZone(placementHandle[, medium, parentId]) | Fetches any ad |
| CreateBannerZone(placementHandle[, parentId]) | DisplayBannerZone(placementHandle[, parentId]) | Fetches only banner ads |
| CreateTextZone(placementHandle[, parentId, showImage]) | DisplayTextZone(placementHandle[, parentId, showImage]) | Fetches only text ads (up to 135 characters) |
| CreateShortTextZone(placementHandle[, parentId, showImage]) | DisplayShortTextZone(placementHandle[, parentId, showImage]) | Fetches only text ads (but reduces them to 70 characters and inserts trailing dots) |
Parameters
placementHandle - (string) - Represents the unique id for your ad zone. You can grab it in the Setup->Ad Zones->Ad Tag page
parentId - (string, optional) - Represents the id of an existing element in the DOM tree. If it is omitted or the corresponding element does not exist, an ad placeholder div is created and inserted with the document.write() function. Otherwise, the ad placeholder div is attached to the parent element.
medium - (string, optional) - Specifies what format of ad should be fetched. The default value is all. Possible values include
- all - Shows all types of ads.
- text - Shows text ads
- textonly - Shows text ads without images
- shorttext - Shows 70-character text ads
- shorttextonly - Shows 70-character text ads without images
- textlinks - Shows text ads headlines only. Useful if you want to display text link ads.
- image - Shows image ads i.e. JPG, GIF and PNG
- flash - Shows flash ads
- banner - Shows both image and flash ads
- audio - Shows audio ads
- video - Shows video ads
- html - Shows html or javascript ad tags
showImage - (boolean) - Toggles the display of images in text ads. The default value is true