flash - Make Uploadify work in a jquery accordion header when wmode=transparent -
i have jquery accordion, , want insert uploadify inside accordion header. putting there worked fine, when set uploadify swf wmode transparent, not work well:
-in chrome clicking upload swf nothing
-in firefox open upload window, closes/opens accordion
-in internet explorer acutally works fine
if set wmode window work fine, must use transparent mode.
any ideas?
arad.
edit: solution invoke uploadify swf click using javascript- possible?
edit2: code-
relevant html:
<div id="accordion"> <div class="category" id="category$category_id"> <h3 class="ui-accordion-header"> <div class="header-div"> <div id="categorytitle$category_id" class="categorytitle">$category_name</div> </div> <div class="rightpart"> <input id="fileinput$category_id" class="fileinput" name="fileinput" type="file" /> </div> </h3> <div style="overflow: auto; height: 400px; text-align: left; padding: 10px"> (pictures here...) </div> </div> <div class="category" id="category$categor... (more categories) </div>
relevant javascript:
var stop = false; $('#accordion h3').click(function(event) { if (stop) { event.stopimmediatepropagation(); event.preventdefault(); stop = false; } }); $('#accordion').accordion({ header: "> div > h3", collapsible: true }).sortable({ axis: "y", handle: "h3", stop: function(event, ui) { stop = true; }, update: function(event, ui) { var categoriesarray = $(event.target).sortable('toarray'); updatecategoriesorder(categoriesarray); } }) $('.fileinput').livequery(function(){ var myid = $(this).attr('id'); // grab id of clicked fileinput button (e.g. 'fileinput45') myid = myid.replace('fileinput',''); // strip down numeric value $(this).uploadify({ 'uploader' : 'uploader/uploadify.swf', 'script' : 'uploader/uploadify.php', 'cancelimg' : 'uploader/cancel.png', 'multi' : true, 'auto' : true, 'folder' : '/uploads', 'width' : 24, 'height' : 24, 'wmode' : 'transparent', //'wmode' : 'window', 'filedesc' : 'images (*.jpg;*.jpeg;*.jpe;*.png;*.gif;*.bmp)', 'fileext' : '*.jpg;*.jpeg;*.jpe;*.png;*.gif;*.bmp;', 'queueid' : 'uploadqueue',// + myid, oncomplete : function(event, queueid, fileobj, reposnse, data) { //alert(myid); } }); });
ok problem solved. seems wasn't accordion or wmode's fault, jquery's sortable.
my accordion sortable , when trying press uploadify swf sortable methods took over. solution can found in thread: http://www.uploadify.com/forum/viewtopic.php?f=7&t=1556
what did wrap swf div, , use sortable's 'cancel' option prevent div's class being dragged ({cancel : ".uploadswfdiv"}).
in firefox clicking swf opens/closes accordion, prevent added code:
$('.uploadswfdiv').click(function(event) { event.stoppropagation(); } );
Comments
Post a Comment