하위 창 과 부모 창 값 예제 js 코드

 
//
function returnParent(value) {//
var parent = window.dialogArguments; //
//parent.location.reload(); //
if (parent != null && parent != "undefined") {
window.returnValue = value; //
window.close(); //
}
//window.opener.document.getElementById("ActivityPic");//
//$(selector, window.parent.document);
//$(selector, window.opener.document);
return;
}
// ,
function showModalOnly(me, url) { // ,
var hidden = document.getElementById(me); //
if (hidden != null && hidden.value != null && hidden.value.length > 0) {
alert(" , , 。");
return;
}
var reValue = window.showModalDialog(url, window, "dialogHeight:500px; dialogWidth:987px; status:off; scroll:auto");
if (reValue == null || reValue == "undefined" || reValue == "") {
return; // ,
}
var index = reValue.split("^"); // ^
if (index[0] == null || index[0] == "undefined" || index[0].length < 1) {
return;
}
var hid = index[0].split('&'); //
var view = index[1].split('&'); //
var content = ""; // check
if (hid != null && hid.length == 2) {
var i = 0;
if (hid[i] != "undefined" && hid[i] != "" && view[i + 1] != "undefined" && view[i + 1] != "") {
content += '<table id="' + hid[i]
+ '" class="deleteStyle"><tr><td><img src="../../../Images/deleteimge.png" title=" " alt=" " onclick=" deleteTable('
+ "'" + hid[i] + "'," + "'" + me + "'" + ');" /></td><td>' + view[i + 1] + '</td></tr></table>';
hidden.value = hid[i]; //
var c = document.getElementById("check" + me);
c.innerHTML += content;
return;
}
}
alert(" 。");
return;
}
function openUploadWindow(url, width, height,left,top) {
if(width==null) width=987;
if (height == null) height = 500;
if (left == null) left = 200;
if (top == null) top = 200;
//window.open(url, 'newwindow', 'height=' + height + ',width=' + width + ',top=200,left=200,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
window.showModalDialog(url, window, "dialogHeight:" + height + "px; dialogWidth:" + width + "px;status:off; scroll:auto;dialogLeft:"+left+"px;dialogTop:"+top+"px");
}

좋은 웹페이지 즐겨찾기