Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.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
ajax异步调用服务器时,jquery对话框中的透明背景_Jquery_Css_Ajax_Jquery Ui - Fatal编程技术网

ajax异步调用服务器时,jquery对话框中的透明背景

ajax异步调用服务器时,jquery对话框中的透明背景,jquery,css,ajax,jquery-ui,Jquery,Css,Ajax,Jquery Ui,我有一个jquery对话框,其中包含许多输入字段和一个提交按钮。提交表单时,会向服务器发出一个ajax调用,在此期间,我需要将对话框的背景设置为透明,此时提交按钮也应更改为ajax加载图像 请注意ajax函数中的注释部分 我的代码在这里: 这是一段重要的代码。 谁能指导我使这成为可能。 非常感谢你及时的帮助 提前感谢。这是一个非常简单的方法: 其主要思想是用图像替换按钮内的html,同时在表单上覆盖一个空div 相关JS: 您是否考虑过在对话框设置中设置modal:true?如果您查看我提供的小

我有一个jquery对话框,其中包含许多输入字段和一个提交按钮。提交表单时,会向服务器发出一个ajax调用,在此期间,我需要将对话框的背景设置为透明,此时提交按钮也应更改为ajax加载图像

请注意ajax函数中的注释部分

我的代码在这里:

这是一段重要的代码。 谁能指导我使这成为可能。 非常感谢你及时的帮助


提前感谢。

这是一个非常简单的方法:

其主要思想是用图像替换按钮内的html,同时在表单上覆盖一个空div

相关JS:
您是否考虑过在对话框设置中设置
modal:true
?如果您查看我提供的小提琴,您可以看到这一点。但在这个问题上,这个“模型:正确”的关系是什么。我的问题是,一旦ajax调用被触发,如何在这个JQuery对话框中设置背景图像并将submit按钮更改为ajax加载图像在中,关闭按钮也被删除。我将
.ui对话框按钮set
类添加到选择器中,以便只有下部区域中的按钮才会变成小猫。不透明度功能在IE8中不起作用。我希望这也能在IE8中实现。因此,我做了一些更改1]将“背景:rgba”删除为“背景:rgb”,并分别添加了不透明度。但它不起作用。任何想法。我的密码在这里
$.ajax({
    url:'some url path',
    type:'GET',
    data:{isPDF:0},                                         
    success:function(data,textStatus,xhr)
    {
        setTimeout(function (){
        // I need some logic to implement here to make a transparent background
        // (so that user cant do any thing on background). Also I need to change
        // the submit button to an ajax loading image.                      
        },2000);

        (event.preventDefault) ? event.preventDefault() : event.returnValue = false;                                
        $("#prnt_info_sbmt").click();                   
    },              
    error:function(xhr,textStatus,errorThrown)
    {
        alert(errorThrown); 
    }
});
setTimeout(function (){
    $(".ui-dialog-buttonset .ui-button").html("<img src='http://placekitten.com/g/65/38'/>")
        .attr("disable", "disabled");
    $("#popup").append("<div class='sheen'/>");
},2000);
.sheen {
    width:100%;
    height:100%;
    position:absolute;
    top:0;
    left:0;
    background: rgba(255, 255, 255, 0.75);
}