Fix xface with last banana and make white region transparent
[platal.git] / htdocs / javascript / xorg.js
index 902a58b..66923c1 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  Copyright (C) 2003-2004 Polytechnique.org                              *
+ *  Copyright (C) 2003-2006 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -63,6 +63,30 @@ function attachEvent(obj, evt, f, useCapture) {
 }
 
 // }}}
+// {{{ dynpost()
+
+function dynpost(action, values)
+{
+    var body = document.getElementsByTagName('body')[0];
+
+    var form = document.createElement('form');
+    form.action = action;
+    form.method = 'post';
+
+    body.appendChild(form);
+
+    for (var k in values) {
+        var input = document.createElement('input');
+        input.type = 'hidden';
+        input.name = k;
+        input.value = values[k];
+        form.appendChild(input);
+    }
+
+    form.submit();
+}
+
+// }}}
 
 /***************************************************************************
  * POPUP THINGS