[Owncloud] problem in js/lib_files.js
Robin
icewind1991 at gmail.com
Sat Mar 27 20:48:57 UTC 2010
On Saturday 27 March 2010 14:08:56 Aditya Patawari wrote:
> Hi,
> I have appended a few lines at the end of the OC_FILES.showbrowser_callback
> function just after "contentNode.appendChild(
> files);" in js/lib_files.js. The lines are :
>
> var ubutton=document.createElement('button');
> ubutton.name='ubutton';
> ubutton.setAttribute('type','button');
> ubutton.setAttribute('value','Upload');
>
> ubutton.setAttribute('onclick','OC_FILES.showuploader(\''+dir+'\',\''+td+'\
> ')')
> contentNode.appendChild(ubutton);
>
> I am doing this to get a button which, on clicking, would show an uploader
> but this is not happening. Can someone point out my mistake?
I think the problem is that you're casting td to a string here, instead of
passing the variable to showuploader() you're passing the string
representation of td.
the best solution would be placing td in a global variable I guess.
- Robin Appelman
More information about the Owncloud
mailing list