The load
method[
^] will insert the loaded HTML into the current page. Any form submission would be sent to the current page, not the loaded page. You would likely receive an
"invalid postback or callback argument" error, since the current page doesn't know about the controls from the product code page.
Try using an
<iframe>
to load the product code page instead:
<div id="modal_PrdCddialog">
<!--
<iframe frameborder="0" marginwidth="0" marginheight="0" width="450" height="300"></iframe>
</div>
function getfoc() {
$("#modal_PrdCddialog iframe").attr({ src: "ProductCode.aspx" });
$("#modal_PrdCddialog").dialog({
title: "Select the Product Code to fill the Tire size",
css: { border: 'Yellow' },
autoOpen: true,
modal: true,
height: 350,
width: 450,
buttons: {
Save: function(){
debugger;
var value = $(this).find("iframe").contents().find("#ddlProductCd").val();
$("#txtProdcode").val(value);
$(this).dialog("close");
$(this).find("iframe").attr({ src: "" });
},
Close: function () {
$(this).dialog("close")
$(this).find("iframe").attr({ src: "" });
}
}
}).prev(".ui-dialog-titlebar").css("background", "blue");
}