Create an mbox with at.js 2.x | Community
Skip to main content
ambikaTewari_ATCI
Community Advisor
Community Advisor
April 3, 2020
Solved

Create an mbox with at.js 2.x

  • April 3, 2020
  • 2 replies
  • 8779 views

Hi Team,

 

mboxCreate method doesn't work with at.j.
How could we create an mbox div at page level?

I tried with below code but no luck :

 

<div class="mboxDefault">
adobe.target.getOffer({
"mbox": "customTestMbox",
"params": {
"status": "true"
},
"success": function(offer) {
adobe.target.applyOffer( {
"mbox": "customTestMbox",
"offer": offer
} );
},
"error": function(status, error) {
console.log('Error', status, error);
}
});
</div>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by surebee

Hi @ambikatewari_atci,

Try closing your <div> tag before the script. Please see https://docs.adobe.com/help/en/target/using/implement-target/client-side/upgrading-from-atjs-1x-to-atjs-20.html#mboxcreatemboxparams for a sample.

 

Thanks!

2 replies

surebee
Adobe Employee
surebeeAdobe EmployeeAccepted solution
Adobe Employee
April 4, 2020
ambikaTewari_ATCI
Community Advisor
Community Advisor
April 5, 2020
Sure @surebee, But m getting error now as :index.html:826 Uncaught ReferenceError: adobe is not defined
Amelia_Waliany
Adobe Employee
Adobe Employee
April 22, 2020

Hi @ambikatewari_atci

 
Our next Adobe Target Skill Builder Webinar is right around the corner on May 5th, and will be presented by Adobe Target Product Management on migrating Adobe Target’s mbox.js to At.js. Check out this community discussion to register today. Hope you can make it!
 
Warmly,
Amelia