artdialog popup

Recently, I encountered a better pop-up box when I was working on a project, and I made a record here:

If you encounter an iframed page: you can include a new domain like this .

content: content: "<iframe src=\""+url+"\" width=\"1200px\" height=\"500px\" scrolling=\"auto\" frameborder=\"0\"></iframe>"
<!-- dialog pop-up layer introduction -->
<script type="text/javascript" src="<%=contextPath%>/scripts/artDialog-master/zz/dialog-plus.js?rnd="+Math.random()"></script>
<link rel="stylesheet" href="<%=contextPath%>/scripts/artDialog-master/css/ui-dialog.css"/>

function aa () {
		var d = dialog (
			title: 'Message',
			content: 'The cyan shirt blown by the wind, the warm face in the sunset, you are more beautiful than before, like a blooming flower<br>——Xu Wei "Unforgettable Day"',
//			content: "<iframe src=\""+url+"\" width=\"1200px\" height=\"500px\" scrolling=\"auto\" frameborder=\"0\"></iframe>",
			okValue: 'OK',
			ok: function () {
				dialog()
				.title('Tips 2')
				.content('hello world')
				.button([{
					value: 'open',
					autofocus: true,
					callback: function () {
						dialog()
						.title('Tips')
						.showModal();
					}
				}])
				.show();
				return false;
			},
			cancelValue: 'Cancel',
			cancel: function () {}
		});

		d.showModal();
	}

 If you encounter a way that you can only jump to the page based on the background control, but you don't want to use iframe. You can use ajax to take out the source code first, and then put it into the content of the pop-up layer .

E.g:

//select department
	function getOrgConstructorByNewCust(orgCode, orgName,type,orgMemType,orgTitle){
		var orgCode1=jQuery("#registOrganize").val();
		if(!isNull(orgCode) && !isNull(orgCode1)){
			var url=contextPath+'/baseManager/BMAction.do?action=getOrgConstructor&Id1='+orgCode+"&Id2="+orgName+"&type="+type+"&orgMemType="+orgMemType+"&orgCode="+orgCode1+"&createFlag="+createFlag;
			jQuery.ajax({
				url:url,
				async:false,
				data:{
				},
				dataType:"html",
				success: function(data){
					var d = dialog (
						id:'selectdept',
						width: '730px',
						height:'300px',
						title: 'Select department',
						content: data,
						ok: false,
						cancel: function(){
						},
						cancelValue: 'Cancel'
					});
					d.showModal();
				},
				error:function(xhr,status){
					MWalert(1,"Background exception");
					return;
				}
			});
		}else{
			MWalert(1,"Please select an institution first");
			return;
		}

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326858383&siteId=291194637