File attachment widget with Javascript

25 February 2005   9 comments   Web development

Powered by Fusion×

The Gmail user interface has a good way of dealing with file attachments that I would like to incorporate into the IssueTrackerProduct Add Issue page to make it easier and more flexible to use.

Unlike Gmail, the IssueTrackerProduct can't rely on Javascript so this has to work equally well in Lynx, IE or Firefox. The Lynx people will have to do with the existing interface where you get a list of file attachment inputs. The people with Javascript support will get a hyperlink that when clicked shows a file input box.

Without further ado, please have a test

Did it work?
Was it user-friendly do you think?
Do you prefer the old fashioned input?

The idea is that the Javascript is to be driven by server logic (e.g. Zope) because the server defines a maximum number of file uploads and the form input should reflect this.

Some work is still needed to make this more compact and easily deployable but for now, please give me your feedback on what you've seen.


Peter Bengtsson
Just tested. This works with Konquerer.
Seems to work with firefox 2.0
Kevin Marksteiner
G'day Peter.
I am new at website building so I am quite 'stupid'. I love your file attachment widget and would like to incorporate it into my site for the user to upload pictures and then press submit to send to my email, contents of my form plus the attached pictures. I want the user to be able to send up to 8 pictures an only in jpg, gif or bmp format. Are you able to help me with this??

Jim Myers
Hello Pete!

I am very interested in using your file-attachment-widget on my website:

It would be great if this can become a possibility as my site is for historical purposes and I'd like to give the visitor to my site the opportunity to send attachments of what ever information they may have for me to concider adding to my site. It has grown to 2 GB's+ in size.

Please get back in touch with me and let me know if this can become a reality.

Thanking you in advance,
Jim Myers,

PS: It would be like giving your script a test drive on my site.
Hi Pete,

I am trying to do the same job that u have already done. Is that possible for u to share your code with me? The widget that u have made is very cool..

Was interested in your attachment thingy too. Are we allowed to download it.
your widget's so cool! i've been meaning to have one just like it on my site.. could you please share the html codes with me?
thanks in advance!
Will K
Just tried clicking the link, says file not found.
Peter Bengtsson
My bad. The original file was lost when I moved the blog from the old, now decommissioned, server. It used to be a static file.
Thank you for posting a comment

Your email will never ever be published

Related posts

BaconWhores ha! 23 February 2005
Encrypted files in Emacs 01 March 2005
Never put external Javascript in the <head> 02 April 2013
Gmail tip: Searching only for attachments 25 November 2010
Muted conversations in Gmail 29 May 2010
The awesomest way possible to serve your static stuff in Django with Nginx 24 March 2010
mailto: considered stupid, especially with ?subject 25 April 2009
V8 < TraceMonkey < SquirrelFish 23 September 2008
The Official Dilbert Widget 31 January 2008
Interesting lesson learnt on shortcut taking in usability 02 August 2007 running jQuery 18 January 2007
DOM Scripting 05 December 2005