简体   繁体   English

根据所选行(html表)动态更改Jquery UI对话框标题

[英]Change Jquery UI Dialog title Dynamically according to the selected row (html table)

I'm using JQuery UI Dialog to show some specific details for a selected row (in html table). 我正在使用JQuery UI对话框显示选定行(在html表中)的一些特定详细信息。

When the user click on a row (where there is an image), the Dialog is opened and it contains an html table too with additional details for the selected row. 当用户单击一行(有图像)时,对话框将打开,并且对话框中还包含一个html表,其中包含所选行的其他详细信息。

What i would like to do? 我想做什么? Add a dynamic title according to the specific selected row 根据选定的特定行添加动态标题

My Dialog: 我的对话框:

$("#conteneurop").dialog({
width: 900,
height: 450,
modal: true,
position: 'center',
overlay: { opacity: 0.5, background: 'black'},
autoOpen: false,
buttons: {
"close": function() {                   
$( this ).dialog( "close" );                    
}}
});

When the user click on the image: 当用户单击图像时:

$('#container tbody tr td img').live('click',function(){
ajaxCall($(this).attr('id'));   
})

The call of the Dialog itself 对话框本身的调用

function ajaxCall(datos){                   
$.ajax
({
type: "POST",
url: "operators.php",
data: "datos="+datos,
success: function(oper)
{
$("#conteneurop").dialog('open').html(oper);
}
});
}

请尝试以下操作:

$("#conteneurop").dialog('option', 'title', 'New Title');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM