Search code examples
javascriptframe

Javascript set frame width and height


I must place afiliate script with iframe, i have this code:

Eturas.frame({ width: '100%' });

I want set also height: I try this :

Eturas.frame({ width: '100%', height: '1000px',  });

But this code does not work - where can be a problem?

All code:

<script type="text/javascript">
var _et = _et || [];
_et.push(['project', 'daigera-egzotic']);
_et.push(['type', 'hermes']);
_et.push(['url', 'trips/index/type:exotic']);
(function() {
document.write('<' + 'script type="text/javascript" src="http://www.eturas.lt/js/v9/eturas.js"><' + '/script>');
}) ();
</script>
<script type="text/javascript">
Eturas.frame({ style: 'width: 100%; height: 100px;' });
</script>

Solution

  • i would make $('#idFrame').css('height','100px'); for example with jquery or
    $("#idFrame").css({"width":"100%","height":"100px"});