我正在尝试使用ColdFusion JavaScript函数来创建CFWindow和中心。我将文档/教程遵循了一个t,我在CF8和CF9中尝试了这个,但我无法让它成为中心。我做错了什么?

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

谢谢:)

有帮助吗?

解决方案

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;
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top