Link-view.html
1.31 KB
<div class="bodyWrap row ">
<div ng-include="'app/widget/MainMenu.html'" />
<div class="main" >
<div id="siteloader" class="col-sm-12">
<!--<object style="width:100%; height:100%" type="text/html" data={{objdata}}></object>-->
<object id="externalLink" ng-style="myObj" type="text/html" data={{objdata}}></object>
</div>
</div>
</div>
<script>
$(document).ready(function () {
var myEventMethod = null;
var myEventListener = null;
var myEventMessage = null;
myEventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
// create event listener
myEventListener = window[myEventMethod];
// browser compatibility: attach event uses onmessage
myEventMessage = myEventMethod == "attachEvent" ? "onmessage" : "message";
// register callback function on incoming message
myEventListener(myEventMessage, function (e) {
// we will get a string (better browser support) and validate
// if it is an int - set the height of the iframe #my-iframe-id
if (e.data == parseInt(e.data)) {
document.getElementById('externalLink').height = e.data + "px";
$('body').scrollTop(0);
}
}, false);
});
</script>