Click here to Skip to main content
15,891,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all Expertise ,

Here i am open Modal Popup Form and i want close this on button Click and go-back to parent form on next button ,

i am new to use this popup form and so i don't have any idea what to do here,or how to redirect this to it's parents form without refreshing parent form ;

i do here $.post method to first send data to controller save this and trying to get back on parent form ,
.tpCompony1 is button that i want do disabled false , and then want select it


need help ,

What I have tried:

<script>
		$("#saveContinue1").click(function () {
			var url = "/MyCompony/Comp1save1";
			var shopname = $("#SHOP_NAME").val().trim();
			alert("ok");
			$.post(url, { SHOP_NAME: shopname }, function (json) {
				
				RefreshParent();
				$(this).dialog('distroy').remove();
				$(this).parent('.tpCompony1').prop("disabled", false);
				$(this).parent('.tpCompony1').focus();
			});
			function RefreshParent() {
				if (popup.opener != null && !popup.opener.closed) {
					window.opener.location.reload();
				}
			}
			window.onbeforeunload = RefreshParent;
		})

	</script>
Posted
Updated 29-Mar-19 5:30am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900