summaryrefslogtreecommitdiff
path: root/misc/drupal.js
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-04-27 18:12:25 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-04-27 18:12:25 +0000
commit23bd2c005a7c50c740109ed6b732159a67f62e3f (patch)
tree727bf0e2fc87dc0e07ce80f67b65fa189758359b /misc/drupal.js
parent00f8037e45b1dcb4f7ebde44793c1241b0ae314c (diff)
downloadbrdo-23bd2c005a7c50c740109ed6b732159a67f62e3f.tar.gz
brdo-23bd2c005a7c50c740109ed6b732159a67f62e3f.tar.bz2
#60532: multiple file upload broken in some browsers
Diffstat (limited to 'misc/drupal.js')
-rw-r--r--misc/drupal.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/misc/drupal.js b/misc/drupal.js
index cf4510a28..e697fc855 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -113,7 +113,7 @@ function HTTPPost(uri, callbackFunction, callbackParameter, object) {
* window.parent.iframeHandler() after submission.
*/
function redirectFormButton(uri, button, handler) {
- // Make sure we have an iframe to target
+ // (Re)create an iframe to target.
createIframe();
// Trap the button
@@ -140,8 +140,8 @@ function redirectFormButton(uri, button, handler) {
// Get response from iframe body
try {
response = (iframe.contentWindow || iframe.contentDocument || iframe).document.body.innerHTML;
- // Firefox 1.0.x hack: Replace control characters
- response = response.replace(/[\f\n\r\t\v]/g, ' ');
+ // Firefox 1.0.x hack: Remove (corrupted) control characters
+ response = response.replace(/[\f\n\r\t]/g, ' ');
if (window.opera) {
// Opera-hack: it returns innerHTML sanitized.
response = response.replace(/&quot;/g, '"');
@@ -151,8 +151,8 @@ function redirectFormButton(uri, button, handler) {
response = null;
}
- // Recreate the iframe: re-using an old iframe can sometimes cause browser bugs.
- createIframe();
+ $('redirect-target').onload = null;
+ $('redirect-target').src = 'about:blank';
response = parseJson(response);
// Check response code
@@ -353,7 +353,7 @@ function createIframe() {
*/
function deleteIframe() {
var holder = $('redirect-holder');
- if (typeof holder != 'undefined') {
+ if (holder != null) {
removeNode(holder);
}
}