Vai al contenuto

Integrare blog in Rapid Weaver


Messaggi raccomandati

Ragazzi sto cercando di integrare un blog tumblr nel mio sito fatto con Rapid Weaver.

Tutto funziona a meraviglia usando gli Iframe, il problema però è impostare la lunghezza dell'Iframe (ovviamente la pagina di tumblr ha lunghezza variabile).

Che voi sappiate è possibile far adattare il template di Rapid Weaver a Iframe di lunghezza variabile?

Grazie :rolleyes:

Pancho was a bandit boy, his horse was fast as polished steel

He wore his gun outside his pants

-----

Il Principe diventa Re, nella notte di Madrid.

Link al commento
Condividi su altri siti

In rete ho trovato questo codice ma non so dove metterlo...

<script type="text/javascript">

<!--

moz=document.getElementById&&!document.all

mozHeightOffset=20

function resize_iframe(){

document.getElementById("sizeframe").height=100 // required for Moz bug, value can be "", null, or integer

document.getElementById('iframe_id').height=window.frames["iframe_name"].document.body.scrollHeight+(moz?mozHeightOffset:0)

}

// -->

</script>

<iframe width=300 id="sizeframe" name="sizeframe" src="" scrolling="no" frameborder="yes" onload=resize_iframe()></iframe>

Ho trovato anche questo...

<script type="text/javascript">

function setFrameHeight() {

frame = window.document.getElementById('forum_iframe_id');

innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;

objToResize = (frame.style) ? frame.style : frame;

if(innerDoc.body)

objToResize.height = innerDoc.body.scrollHeight+"px";

else

objToResize.height = "100%";

}

</script>

Pancho was a bandit boy, his horse was fast as polished steel

He wore his gun outside his pants

-----

Il Principe diventa Re, nella notte di Madrid.

Link al commento
Condividi su altri siti

Archiviato

Questa discussione è archiviata e chiusa a future risposte.

×
×
  • Crea Nuovo...