Originariamente inviato da intimoviro
Salve a tutti, ho un problema ho una stringa ad esempio fatta cosi:
codice:
<iframe src="http://player.vimeo.com/video/31426899?title=0&byline=1&portrait=0&color=ffffff" width="500" height="300" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
Ora in base alla pagina devo cambiare la larghezza e l'altezza.
Come posso fare per modificare i parametri facendo diventare width da 500 in 190 e height da 300 a 108 ad esempio.
Spero di essere stato abbastanza chiaro.
Grazie
Ecco qua un esempio pratico basta usare javascript 
codice:
<script language="JavaScript">
function autoResize(id){
var newheight;
var newwidth;
if(document.getElementById){
newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
}
document.getElementById(id).height= (newheight) + "px";
document.getElementById(id).width= (newwidth) + "px";
}
</script>
<IFRAME SRC="usagelogs/default.aspx" width="100%" height="200px" id="iframe1" marginheight="0" frameborder="0" onLoad="autoResize('iframe1');"></iframe>