Problema con Form Orbeon utilizando iframe

classic Classic list List threaded Threaded
4 messages Options
avp
Reply | Threaded
Open this post in threaded view
|

Problema con Form Orbeon utilizando iframe

avp
Hola,

mi caso es:
tenemos un formulario orbeon dentro de un <iframe>

problema:
el problema es que el tamaño del formulario, cuando seleccionas algún campo requerido y no lo rellenas, aparece un mensaje en el formulario, de manera que el formulario crece pero el iframe no.
asi que pierdo parte del formulario que se queda fuera del iframe.

¿como puedo re dimensionar el iframe automáticamente dependiendo del contenido sin utilizar scroll?
la función:
function redimensionarFrame(){
                //setInterval("redimensionarFrame();", 50000);
                iframe = document.getElementById('formFrame');
                //altForm = document.getElementById('formularioProcedimiento');
                docHeight = mainContent.document.body.scrollHeight;
                alert("Tamaño iframe: " + iframe.height + "Tamaño contenido: " + docHeight);
               
                //document.getElementById('formFrame').style.height = alturaForm + '15';
               
                iframe.height = iframe.contentDocument.documentElement.scrollHeight + 15;
               
                $("#formFrame").height($("#formFrame").contents().find("html").height());

        }

el iframe:
<iframe onload="redimensionarFrame()" class="formFrame" id="formFrame" scrolling="no" name="formFrame" frameborder="1" width="100%" height="500" src="http://demo.orbeon.com/orbeon/fr/Prueba/prueba/new" >
</iframe>

por favor, alguna ayuda.

muchas gracias
Reply | Threaded
Open this post in threaded view
|

Re: Problema con Form Orbeon utilizando iframe

bruno.buzzi
CONTENTS DELETED
The author has deleted this message.
avp
Reply | Threaded
Open this post in threaded view
|

Re: Problema con Form Orbeon utilizando iframe

avp
Hello,

my case is:
Orbeon have a form within a <iframe>

problem:
the problem is that the size of the form, when you select a field required and not filled, a message appears on the form so that the form does not grow but the iframe.
so I lose part of the form that is outside the iframe.

How I can re size the iframe automatically depending on the content without using scroll?
function:
redimensionarFrame function () {
                 / / setInterval ("redimensionarFrame ()", 50000);
                 iframe = document.getElementById ('formFrame');
                 / / altForm = document.getElementById ('formularioProcedimiento');
                 docHeight = mainContent.document.body.scrollHeight;
                 alert ("iframe size:" + iframe.height + "content size" + docHeight);
                
                 / / document.getElementById ('formFrame'). style.height alturaForm + = '15 ';
                
                 iframe.height iframe.contentDocument.documentElement.scrollHeight + = 15;
                
                 $ ("# formFrame"). height ($ ("# formFrame.") contents (). find ("html"). height ());

         }

the iframe:
<iframe onload = "redimensionarFrame ()" class = "formFrame" id = "formFrame" scrolling = "no" name = "formFrame" frameborder = "1" width = "100%" height = "500" src = "http: / / demo.orbeon.com / Orbeon / fr / test / test / new ">
</ iframe>

please some help.

thank you very much
Reply | Threaded
Open this post in threaded view
|

Re: Problema con Form Orbeon utilizando iframe

Alessandro  Vernet
Administrator
Hi,

This seems to be a problem that is not specific to Orbeon, and that many people seem to have. See for instance:

http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content

I have not tried this myself, but hope it'll help.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet