rem: var div = document.createElement('div'); div.innerHTML = '<iframe name="redirect-target" id="redirect-target" src="" style="width:0px;height:0px;border:0;"></iframe>'; button.parentNode.appendChild(div); 
add: var iframe = document.createElement('iframe'); with (iframe) { name = 'redirect-target'; setAttribute('name', 'redirect-target'); id = 'redirect-target'; } with (iframe.style) { position = 'absolute'; height = '1px'; width = '1px'; visibility = 'hidden'; } document.body.appendChild(iframe); 
context: function redirectFormButton(uri, button, handler) {  // Insert the iframe  var div = document.createElement('div');  div.innerHTML = '<iframe name="redirect-target" id="redirect-target" src="" style="width:0px;height:0px;border:0;"></iframe>';  button.parentNode.appendChild(div);  // Trap the button  button.onfocus = function() {    button.onclick = function() {      // Prepare vars for use in anonymous function.      var button = this;      var action = button.form.action;      var target = button.form.target;      // Redirect form submission      this.form.action = uri;      this.form.target = 'redirect-target';      handler.onsubmit();      // Set iframe handler for later      window.iframeHandler = function (data) {        // Restore form submission        button.form.action = action;        button.form.target = target;        handler.oncomplete(data);      }    }  }  button.onblur = function() {    button.onclick = null;  }}
meta: 3097	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3097/7f73c2bfb2ad78e8867ba25c1fb1e6848418f6da/drupal.js/buggy/misc/drupal.js