[Dojo-interest] File Uploader in Widget
Josh Trutwin
josh at trutwins.homeip.net
Fri Nov 13 15:50:19 EST 2009
Hi - I'm trying to create a file uploader widget inside another
custom widget. First question - I'm wondering if this is the right
way to use startup().
The widget has this in its template string:
<span dojoAttachPoint="uploaderNode">Attach a File</span>
and this for startup():
startup: function() {
props = { uploadUrl: '/foo', etc.... };
this.fileUploader = new dojox.form.fileUploader(
props, this.uploaderNode
);
this.inherited(arguments);
}
It seems to be working but for some strange reason my button text is
just "Attach" instead of "Attach a File". Should I be using
postMixInProperties() instead of startup? This kind of widget
writing is new to me...
Also, is it possible to use an image for the upload button? - say
something like this:
<span dojoAttachPoint="uploaderNode"><img src="/attach.gif"></span>
This doesn't seem to work - get blue rectangle instead of the image.
I tried some of the CSS stuff on the FileUploader page in campus
using background-image but cannot seem to get it working correctly....
Thanks for any pointers, FileUploader looks like a really nice widget
so far.
FYI: Dojo 1.3.2
Josh
More information about the Dojo-interest
mailing list