Pergunta

Estou tentando usar uma função javascript Coldfusion para criar um cfwindow e centralizá-lo.Eu segui a documentação/tutoriais até o fim e tentei isso no CF8 e CF9, mas não consigo centralizá-lo.O que estou fazendo de errado?

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

Obrigado :)

Foi útil?

Solução

Use a função abaixo para criar um CfWindow.Função de chamada create_Window() em <a> marcação.

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 em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top