I have code:
$(function() {
$("#dialog").dialog({
bgiframe: true,
autoOpen: false,
height: 300,
modal: true,
buttons: {
Cancel: function() {
$(this).dialog('close');
}
},
close: function() {
allFields.val('').removeClass('ui-state-error');
}
});
$("input[name=edit]").click(function() {
alert(1);
$("#dialog input[@id=ItemId]").val($("ItemId"));
alert(2);
$("#dialog input[@id=CatId]").val($("CatId"));
$("#dialog input[@id=UnitId]").val($("UnitId"));
$("#dialog input[@id=SaleOffId]").val($("SaleOffId"));
$("#dialog input[@id=ItemCode]").val($("ItemCode"));
$("#dialog input[@id=ItemName]").val($("ItemName"));
$("#dialog input[@id=UnitCost]").val($("UnitCost"));
$('#dialog').dialog('open');
})
.hover(
function() {
$(this).addClass("ui-state-hover");
},
function() {
$(this).removeClass("ui-state-hover");
}
).mousedown(function() {
$(this).addClass("ui-state-active");
})
.mouseup(function() {
$(this).removeClass("ui-state-active");
});
});
I want to set value for dialog which is support from Form. I wrote function $("input[name=edit]").click(function() to set value to dialog each button edit is click but it wrong. i don't know i where i wrong.please help me
Thanks