Dhtml is not defined HYPE-601.thin.min.js:82:75


I have a Hype3 project that I used to create a new Hype3 project on MacOS 10.15.5. I created a click event for an ad to use a clickTag for the ad delivery system. However, when I export the project to HTML5 and preview in browser and click the ad, I get an error:
Error in undefined: ReferenceError: dhtml is not defined HYPE-601.thin.min.js:82:75

I thought this may be an Hype3 issue and have a trial of Hype4 running with an upgraded copy of the project now. I get a similar error:

Error in undefined: ReferenceError: dhtml is not defined HYPE-670.thin.min.js:84:75

The click event is trying to run the following code:

    // element - DOMHTMLElement that triggered this function being called
    // event - event that triggered this function being called
    function clickTag(hypeDocument, element, event) {
    		window.open(dhtml.getVar('clickTAG', 'http://www.riverparkfunds.com/longshort-opportunity-fund'), 
    		dhtml.getVar('landingPageTarget', '_blank')

Any idea on how to fix this? Or what I’m doing wrong?

  • Mike

When you run the dhtml.getVar function, the dhtml needs to already exist in the scope you’re calling it. So perhaps the ad delivery system you’re using has a snippet of JS code that needs to be included on its ads? This will likely have the dhtml function.

1 Like


It is the MorningStar ad network.

We have used this same process in an older ad back in 2017. When I view the OLD ad in a local browser as a file open, the click event work. If I open the old project in my current version of Hype3 or trial of Hype4 I get the above error.

  • Mike

Can you share the file?


The file that worked from the OLD project? I sent the files for the current project via email. Is there a way to private post here?

  • Mike


Thanks for your help via email. I wanted to post here for others.

I found a leaner way to get the same result,

function clickTag(hypeDocument, element, event) {

var clickTag = "http://www.riverparkfunds.com/longshort-opportunity-fund";



No extra JS. The network can still override the clickTag with their redirect URL.

I also found that is I downloaded the missing http://s1.adform.net/banners/scripts/rmb/Adform.DHTML.js to a local file and included it in the export, It would allow it to work with out having to edit the exported HTML file in the folder.

Thanks again.