From 297d704fdf1e98ee1c405be1dfd6a6c7e1979bf8 Mon Sep 17 00:00:00 2001 From: Scott Gray Date: Thu, 23 Jul 2009 02:49:29 +0000 Subject: [PATCH] Added two new javascript functions that allow a link or form post to take place in the parent window rather than the pop up itself git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@796932 13f79535-47bb-0310-9956-ffa450edef68 --- framework/images/webapp/images/selectall.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/framework/images/webapp/images/selectall.js b/framework/images/webapp/images/selectall.js index 8978b713c3..fbb259d7a0 100644 --- a/framework/images/webapp/images/selectall.js +++ b/framework/images/webapp/images/selectall.js @@ -163,6 +163,23 @@ function popUpPrint(printserver, screen1, screen2, screen3) { } } +// Post a form from a pop up using the parent window +function doPostViaParent(formName) { + var theForm = document[formName]; + var newForm = theForm.cloneNode(true); + var hiddenDiv = document.createElement('div'); + hiddenDiv.style.visibility = 'hidden'; + hiddenDiv.appendChild(newForm); + window.opener.document.body.appendChild(hiddenDiv); + newForm.submit(); + window.opener.focus(); +} +// From a child window, navigate the parent window to the supplied url +function doGetViaParent(url) { + window.opener.location = url; + window.opener.focus(); +} + // hidden div functions function getStyleObject(objectId) {