From September, Flash will no longer be supported by Chrome. Prepare for the shift towards HTML5 by visiting our Flash to HTML5 help page

Check it out!

Converting DHTML to a mobile HTML5 banner

Important: From the 1st of September 2018, DHTML Ads management will no longer be available. Please use HTML Standard Ads as a replacement. Starting from the 1st of January 2019, serving of DHTML Ads will be stopped. The following guidelines will help you to convert from DHTML to HTML. For more information, please contact [email protected]

 

  • Replace Adform.DHTML.js with mraid.js

    Banners from Mobile category use different serving scripts then regular HTML banners. Adform DHTML used in regular HTML5 banners will not work in Mobile evironment. MRAID is only available on Mobile banners.

    Replace

    <script src="//s1.adform.net/banners/scripts/rmb/Adform.DHTML.js"></script>
    

    with:

    <script src="mraid.js"></script>
    

    For full MRAID specifications please visit http://www.iab.net/mraid.

  • Update ClickTAGs

    Replace

    var banner = document.getElementById('banner');
    clickTAGvalue = dhtml.getVar('clickTAG', 'http://www.example.com'); 
    landingpagetarget = dhtml.getVar('landingPageTarget', '_blank');
    
    banner.onclick = function() {
       window.open(clickTAGvalue,landingpagetarget);
    }

     with:

    var banner = document.getElementById('banner');		
    banner.addEventListener('click', function() {			
       mraid.open(Adform.getClickURL('clickTAG'));		
    });
  • Update Additional Assets workflow

    Replace dhtml.getAsset(1) with Adform.getAsset(1)

    Please find an example here.