diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-12-21 17:29:08 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-12-21 17:29:08 +0000 |
commit | 5a37a75966b0a33cc12f4b1db4344e7065d468ff (patch) | |
tree | 17cbda88a22f698aa6cccebfad3518e1d2e75c1b /misc | |
parent | 4b0067ee16b01e80771875ca3964dcdda6846942 (diff) | |
download | brdo-5a37a75966b0a33cc12f4b1db4344e7065d468ff.tar.gz brdo-5a37a75966b0a33cc12f4b1db4344e7065d468ff.tar.bz2 |
Fix JS in:
- #31968: IE
- #41743: Safari
Diffstat (limited to 'misc')
-rw-r--r-- | misc/drupal.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/misc/drupal.js b/misc/drupal.js index d9e706549..e64d3bc60 100644 --- a/misc/drupal.js +++ b/misc/drupal.js @@ -111,7 +111,11 @@ function HTTPPost(uri, callbackFunction, callbackParameter, object) { */ function redirectFormButton(uri, button, handler) { // Insert the iframe - var iframe = document.createElement('iframe'); + // Note: some browsers require the literal name/id attributes on the tag, + // some want them set through JS. We do both. + var div = document.createElement('div'); + div.innerHTML = '<iframe name="redirect-target" id="redirect-target" class="redirect"></iframe>'; + var iframe = div.firstChild; with (iframe) { name = 'redirect-target'; setAttribute('name', 'redirect-target'); @@ -126,7 +130,7 @@ function redirectFormButton(uri, button, handler) { document.body.appendChild(iframe); // Trap the button - button.onfocus = function() { + button.onmouseover = button.onfocus = function() { button.onclick = function() { // Prepare variables for use in anonymous function. var button = this; @@ -150,7 +154,7 @@ function redirectFormButton(uri, button, handler) { return true; } } - button.onblur = function() { + button.onmouseout = button.onblur = function() { button.onclick = null; } } |