本文发表在 rolia.net 枫下论坛//please change the code acording to your request....
//1) in the first screen, use this function, ur first page should have the fild "comments" in the form firstpageform
var PickerHandle = null;
function SelectionOpen(Name, Request, ExtraParameter) {
if (PickerHandle && !PickerHandle.closed) {
alert("Please close the other window before opening this one.");
PickerHandle.focus();
} else {
var PickerDateScreenFormat = "dependent=yes,menubar=no,resizable=yes,scrollbars=yes,status=yes,titlebar=no,toolbar=no,width=625,height=550";
if (typeof(ExtraParameter) == "undefined") {
ExtraParameter = true;
}
PickerHandle = window.open("second.html, "_blank", commentsScreen);
//Window is now open. Waiting for a input to save the selection.
}
}
//2) in the second screen us this function,you have to have the comments input field in the secondpageform
/**************************************************/
function PrepareSave() {
if (opener.closed) {
alert("Warning: Can't save selected item since the request main window is not available.");
window.close();
} else {
var comments = document.secondpageform.comments;
var Anchor = opener.DateStartAnchor;
var Hidden = opener.document.firstpageform.comments;
if (Anchor) {
Anchor.innerText = "some data";
}
Hidden.value = comments.value;
if (Hidden.type == "text") {
Hidden.fireEvent("onchange");
}
opener.focus();
window.close();
}
}更多精彩文章及讨论,请光临枫下论坛 rolia.net
//1) in the first screen, use this function, ur first page should have the fild "comments" in the form firstpageform
var PickerHandle = null;
function SelectionOpen(Name, Request, ExtraParameter) {
if (PickerHandle && !PickerHandle.closed) {
alert("Please close the other window before opening this one.");
PickerHandle.focus();
} else {
var PickerDateScreenFormat = "dependent=yes,menubar=no,resizable=yes,scrollbars=yes,status=yes,titlebar=no,toolbar=no,width=625,height=550";
if (typeof(ExtraParameter) == "undefined") {
ExtraParameter = true;
}
PickerHandle = window.open("second.html, "_blank", commentsScreen);
//Window is now open. Waiting for a input to save the selection.
}
}
//2) in the second screen us this function,you have to have the comments input field in the secondpageform
/**************************************************/
function PrepareSave() {
if (opener.closed) {
alert("Warning: Can't save selected item since the request main window is not available.");
window.close();
} else {
var comments = document.secondpageform.comments;
var Anchor = opener.DateStartAnchor;
var Hidden = opener.document.firstpageform.comments;
if (Anchor) {
Anchor.innerText = "some data";
}
Hidden.value = comments.value;
if (Hidden.type == "text") {
Hidden.fireEvent("onchange");
}
opener.focus();
window.close();
}
}更多精彩文章及讨论,请光临枫下论坛 rolia.net