mboxDefine() and mboxUpdate() - at.js 1.x

Define and update an mbox in Adobe Target.

NOTE
These functions are available for at.js versions 1.x only. These functions were deprecated with the release of at.js 2.x. These functions return default content if used with at.js 2.x.

mboxDefine() and mboxCreate() are tied to HTML DIV elements where the offer should be displayed. These HTML DIV elements should have the mboxDefault class. If the HTML elements won’t have this class attached, you could see some noticeable flicker.

mboxDefine

Creates an internal mapping between a nodeId and an mbox name, but does not execute the request. Used in conjunction with mboxUpdate(). Built into at.js mostly to ease the transition from mbox.js (now deprecated) to at.js.

mboxUpdate

Executes the request and applies the offer to the element identified by the nodeId in the mboxDefine(). Can also be used to update an mbox initiated by mboxCreate. Built into at.js mostly to ease the transition from mbox.js (now deprecated) to at.js. mboxDefine()/ mboxUpdate() could be replaced by adobe.target.getOffer() and adobe.target.applyOffer() using the selector option.

Example

<div id="someId" class="mboxDefault"></div>
<script>
 mboxDefine('someId','mboxName','param1=value1','param2=value2');
 mboxUpdate('mboxName','param3=value3','param4=value4');
</script>
recommendation-more-help
6906415f-169c-422b-89d3-7118e147c4e3