Question

J'essaie d'utiliser une fonction JavaScript ColdFusion pour créer un cfwindow et le centrer.J'ai suivi la documentation / des tutoriels à une t et j'ai essayé cela dans CF8 et CF9 mais je ne peux pas l'obtenir au centre.Qu'est-ce que je fais mal?

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

Merci:)

Était-ce utile?

La solution

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;
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top