svn commit: r796932 - /ofbiz/trunk/framework/images/webapp/images/selectall.js

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r796932 - /ofbiz/trunk/framework/images/webapp/images/selectall.js

lektran
Author: lektran
Date: Thu Jul 23 02:49:29 2009
New Revision: 796932

URL: http://svn.apache.org/viewvc?rev=796932&view=rev
Log:
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

Modified:
    ofbiz/trunk/framework/images/webapp/images/selectall.js

Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=796932&r1=796931&r2=796932&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Thu Jul 23 02:49:29 2009
@@ -163,6 +163,23 @@
     }
 }
 
+// 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) {