AnantLabs / ocupload

Automatically exported from code.google.com/p/ocupload
0 stars 0 forks source link

when element is loaded by another ajax request it don't work #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When element on what i want to open script is loaded with another ajax 
your script don't work - fileselect window will not popup.

Original issue reported on code.google.com by loli...@gmail.com on 15 Dec 2008 at 9:17

GoogleCodeExporter commented 9 years ago
Can you provide a little more detail on your exact issue?  I am not entirely 
sure 
what your scenario entails and how to reproduce for a fix.

Thanks.

Original comment by mhorn...@gmail.com on 18 Dec 2008 at 4:27

GoogleCodeExporter commented 9 years ago
I guess I have the same problem: for example, my link for file uploading is not
visible when my page loads. And then when you click on something, my link 
slides in.
When you bind your script to that link...it doesn't work: surrounding div is 
set to
H&W of zero (and after I change that...i finally see my link, but even if I see 
it -
it won't react to clicks and fileselect will not popup).
If I only change that my link is always visible...everything works!

Original comment by mmi...@gmail.com on 30 Dec 2008 at 3:44

GoogleCodeExporter commented 9 years ago
Yes, I have the same problem as well. I have an invisible div that holds the 
upload
button. When an option is selected I turn the div visible using the jquery 
fadeIn
function. Then, a button with no value and no size appears without any action 
linked
to it.

I tried to wrokaround it by using the following scenario: I turn the div 
visible and
then I add the upload button to it via javascript.
Unfortunately, this doesn't work. The button appears, but the file selection 
screen
doesn't popout.

I'm already trying to fix it, because my time is runningout and I need it 
fixed. If I
find the solution, I'll tell ya!

By the way, this is a very good upload plugin! Thank you for developing it!
When you correct this issue, it will be perfect.

Original comment by guilherm...@gmail.com on 29 Jan 2009 at 6:04

GoogleCodeExporter commented 9 years ago
I've found a way to workaround it!

I took a look into the plugin code and saw how it works.  It seems that the 
mask used
have some problems to find its place after hiding and showing the component 
marked to
upload. So , figured out that placing the upload snippet code in an isolated
container should solve it.

I created an html page and I put the jquery and the OneClickUpload things there 
and
also placed the upload button. Then, I created another html page with an iframe
pointing to the other html page with the upload context. Finally, in my 
mainpage, I
made Jquery load the iframe page to the hiden div that was turned visible.

Kinda dirty... but it works ;D

Original comment by guilherm...@gmail.com on 29 Jan 2009 at 8:16

GoogleCodeExporter commented 9 years ago
When your input element is hidden, ocupload calculates wrong position for input 
form
(margin-top).
I added a little hack into the ocuload.js:
"input.attr('id', 'input_'+id);"
after input.css('marginTop', -container.height()-10+'px');

In my personal.js i corrected form.input postion by:
"$('#input_'+uploaderID).css("marginTop", -50);"

this hack is layout specific

Original comment by n...@gmx.li on 20 Jul 2009 at 11:31

GoogleCodeExporter commented 9 years ago
Terei mesmo que fazer a gambiarra aponta pelo guilherme.ruiz ?...ha ha ha

I solve the problem of the link does not appear, but now does not open the 
dialog box
to select a iamgem

tks

Original comment by eniza...@gmail.com on 2 Aug 2009 at 1:43