How to run <script> tags in an ajax loaded page?

Hi, I am trying to run my ad code to display ads in Framework7 v1.7.0 however I cannot get the code to run on the page.

This is my code

<center id="ads">
                       <script type="text/javascript" data-run="init">
                          atOptions = {
                             'key' : '08d1ebd917b9392c0b306e455b220d4e',
                             'format' : 'iframe',
                             'height' : 50,
                             'width' : 320,
                             'params' : {}
                          };
                          document.write('<scr' + 'ipt type="text/javascript" src="http' + (location.protocol === 'https:' ? 's' : '') + '://www.bcloudhost.com/08d1ebd917b9392c0b306e455b220d4e/invoke.js"></scr' + 'ipt>');
                       </script>
                     </center>

Can someone please help me make in run in this page?

<!-- We don't need full layout here, because this page will be parsed with Ajax-->
<!-- Top Navbar-->
<div class="navbar">
  <div class="navbar-inner">
    <div class="left"><a href="#" class="back link"> <i class="icon icon-back"></i><span>Back</span></a></div>
    <div class="center sliding">About</div>
    <div class="right">
      <!-- Right link contains only icon - additional "icon-only" class--><a href="#" class="link icon-only open-panel"> <i class="icon icon-bars"></i></a>
    </div>
  </div>
</div>
<div class="pages">
  <!-- Page, data-page contains page name-->
  <div data-page="about" class="page">
    <!-- Scrollable page content-->
    <div class="page-content">
      <center id="ads">
        <script type="text/javascript" data-run="init">
           atOptions = {
              'key' : '08d1ebd917b9392c0b306e455b220d4e',
              'format' : 'iframe',
              'height' : 50,
              'width' : 320,
              'params' : {}
           };
           document.write('<scr' + 'ipt type="text/javascript" src="http' + (location.protocol === 'https:' ? 's' : '') + '://www.bcloudhost.com/08d1ebd917b9392c0b306e455b220d4e/invoke.js"></scr' + 'ipt>');
        </script>
      </center>
    </div>
  </div>
</div>

It is a browser security policy. It won’t work. Use/load required external code within pageInit events for appropriate pages