Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从asp.net调用javascript客户端函数的fancybox_Javascript_Jquery_Asp.net_Fancybox_Server Side - Fatal编程技术网

从asp.net调用javascript客户端函数的fancybox

从asp.net调用javascript客户端函数的fancybox,javascript,jquery,asp.net,fancybox,server-side,Javascript,Jquery,Asp.net,Fancybox,Server Side,我试图使用以下代码从asp.net中的代码中调用一个客户端函数: protected void Button2_Click(object sender, EventArgs e) { ClientScript.RegisterClientScriptBlock(this.GetType(), "Script", "<script> showFancy('ClaimNewForm.aspx?ordernumber2=' + $('#TxtCont

我试图使用以下代码从asp.net中的代码中调用一个客户端函数:

        protected void Button2_Click(object sender, EventArgs e)
    {
        ClientScript.RegisterClientScriptBlock(this.GetType(), "Script", "<script> showFancy('ClaimNewForm.aspx?ordernumber2=' + $('#TxtContractNumber').val(), 'Send to Claim', '55%', '65%');</script>", false);
    }
下面是我试图调用的showfancy函数:

    function showFancy(url, title, width, height) {

        $(".fancyBox").fancybox({
            'width': width,
            'height': height,
            'autoScale': true,
            'transitionIn': 'elastic',
            'transitionOut': 'none',
            'type': 'iframe',
            'overlayColor': '#000000',
            'overlayOpacity': 0.7,
            'position': 'fixed',
            'scrolling': 'yes',
            'modal': false,
            'target': "_parent",

            "onClosed": function () {
                window.location = window.location;
            }

        });
        $('.fancyBox').attr({ href: url, title: title });
        $('.fancyBox').click();
    }
当我从客户端调用该函数时,它工作正常,但当我使用上述方法时,showFancyBox页面会出现,但过了一会儿就会消失

出于某些原因和预先检查,我需要从服务器端调用此函数。非常感谢您的帮助,如果需要更多详细信息,请告诉我

    function showFancy(url, title, width, height) {

        $(".fancyBox").fancybox({
            'width': width,
            'height': height,
            'autoScale': true,
            'transitionIn': 'elastic',
            'transitionOut': 'none',
            'type': 'iframe',
            'overlayColor': '#000000',
            'overlayOpacity': 0.7,
            'position': 'fixed',
            'scrolling': 'yes',
            'modal': false,
            'target': "_parent",

            "onClosed": function () {
                window.location = window.location;
            }

        });
        $('.fancyBox').attr({ href: url, title: title });
        $('.fancyBox').click();
    }