Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/02/2008, 10:50
Avatar de Did_Web
Did_Web
 
Fecha de Ingreso: junio-2007
Ubicación: El vendrell (Tarragona)
Mensajes: 52
Antigüedad: 16 años, 10 meses
Puntos: 0
Re: Xhtml + PHP y Flash sin frames

Bueno no se si este post pertenece ya a este subforo (trato de integrar php y flash en Html)....

La cuestión es que surgio un cuarto actor en este drama, el javascript.

El código del iframe.js es......


function
getDocHeight(doc) {

var docHt = 0, sh, oh;

if (doc.height) docHt = doc.height;

else if (doc.body) {

if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;

if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
if (sh && oh) docHt = Math.max(sh, oh);
}
return docHt;
}




function


setIframeHeight(iframeName) {

var iframeWin = window.frames[iframeName];

var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;

if ( iframeEl && iframeWin ) {

iframeEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous

var docHt = getDocHeight(iframeWin.document);
// need to add to height to be sure it will all show
if (docHt) {
if(docHt<976) docHt=976;
iframeEl.style.height = docHt + "px";
}
}
}





function


loadIframe(iframeName, url) {

if ( window.frames[iframeName] ) {

window.frames[iframeName].location = url;

return false;

} else {

return true;
}





}

Así que colocando este archivo con el nombre iframe.js y usandolo según los fragmentos de código que puse anteriromente tendría que funcionar y solucuionar el problema.

De esta forma podria integrar Flash continuos sin interupciones y recoger datos de PHP y Mysql.

Bueno si alguien se le ocurre otra solución....