Pregunta

Estoy tratando de usar una función de JavaScript de ColdFusion para crear un CFWindow y centrarlo.He seguido la documentación / tutoriales a un T y lo he intentado esto en CF8 y CF9, pero no puedo llegar al centro.¿Qué estoy haciendo mal?

<a href="javascript:ColdFusion.Window.create('createdWindow','Window Name',
'test.cfm',{modal: true, center: true});">Create Bound Window</a>

gracias :)

¿Fue útil?

Solución

Use the function below to create a CfWindow. Call function create_Window() in <a> tag.

function create_Window() {
    win = name + "_os_" + Math.round(Math.random() * 10000000000);

    try
    {
        twin = ColdFusion.Window.getWindowObject(winname);
        twin.destroy(true);
    }
    catch (e)
    {
        // do nothing because the window does not exist
    }

    ColdFusion.Window.create(
        win,
        'Request Page',
        'windowPageName.cfm?windowname='+win,
        {
            height:600,
            width:700,
            modal:true,
            closable:true,
            draggable:true,
            resizable:true,
            center:true,
            initshow:true
        }
    )

    winname=win;
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top