Joseph Michael Pesch
VP Programming

Uploadify Issue with IE9 Button Not Triggering Browser to Upload

by 13. April 2013 23:18
Suffering issue wtih IE9 and Uploadify where the button that usually triggers the browse for file dialog does nothing.  It works if I switch to compatability mode but does nothing in standard mode.  I found some updated code below that fixes the issue, just replace the existing code in the jquery.uploadify.js and jquery.uploadify.min.js files.
SWFUpload.prototype.getFlashHTML = function () {
  // Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
  var obj = ['<object id="', this.movieName, '" type="application/x-shockwave-flash" data="', this.settings.flash_url, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">'].join(""),
params = [
'<param name="wmode" value="', this.settings.button_window_mode, '" />',
'<param name="movie" value="', this.settings.flash_url, '" />',
'<param name="quality" value="high" />',
'<param name="menu" value="false" />',
'<param name="allowScriptAccess" value="always" />',
'<param name="flashvars" value="', this.getFlashVars(), '" />'
].join("");
  if (navigator.userAgent.search(/MSIE/) > -1) {
    obj = ['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="', this.movieName, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">'].join("");
    params += '<param name="src" value="' + this.settings.flash_url + '" />';
  }
  return [obj, params, '</object>'].join("");
};

Tags:

JavaScript

Comments are closed