Edit in GitHubLog an issue

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

Define and update an mbox in Adobe Target.

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#

Copied to your clipboard
1<div id="someId" class="mboxDefault"></div>
2<script>
3 mboxDefine('someId','mboxName','param1=value1','param2=value2');
4 mboxUpdate('mboxName','param3=value3','param4=value4');
5</script>
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.