Problem with Javascript ad code I am trying to add a Javascript ad code on our Drupal based website through a block and when I do this, the page doesn't display but only ads display. Please see this sample page:
http://circuitdigest.com/forums/circuits-and-projects-help/arduino

I tried adding on different blocks and even added the ad code by directly inserting in the codes but no changes. Other Javascript based ad codes from other ad networks are working fine but only had problem with this one.

Could someone let me know what could be the problem? Here is the ad code.

    &lt;script id="mNCC" language="javascript"&gt;
    medianet_width = "600";
    medianet_height = "120";
    medianet_crid = "455208315";
    medianet_versionId = "111299";
    (function() {
    var isSSL = 'https:' == document.location.protocol;
    var mnSrc = (isSSL ? 'https:' : 'http:') + '//contextual.media.net/nmedianet.js?cid=8CUWJ3143' + (isSSL ? '&amp;https=1' : '');
    document.write('&lt;scr' + 'ipt type="text/javascript" id="mNSC" src="' + mnSrc + '"&gt;&lt;/scr' + 'ipt&gt;');})();
    &lt;/script&gt;
If you are working on Drupal 8, create a twig like html.html.twig in your themes templates folder and the put your script in there.

&lt;!DOCTYPE html&gt;
&lt;html{{ html_attributes }}&gt;
&lt;head&gt;
    &lt;head-placeholder token="{{ placeholder_token }}"&gt;
    &lt;title&gt;{{ head_title|safe_join(' | ') }}&lt;/title&gt;
    &lt;script id="mNCC" language="javascript"&gt;
    medianet_width = "600";
    medianet_height = "120";
    medianet_crid = "455208315";
    medianet_versionId = "111299";
    (function() {
    var isSSL = 'https:' == document.location.protocol;
    var mnSrc = (isSSL ? 'https:' : 'http:') + '//contextual.media.net/nmedianet.js?cid=8CUWJ3143' + (isSSL ? '&amp;https=1' : '');
    document.write('&lt;scr' + 'ipt type="text/javascript" id="mNSC" src="' + mnSrc + '"&gt;&lt;/scr' + 'ipt&gt;');})();
    &lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;&lt;/body&gt;
&lt;/html&gt;