|
| Recent
Articles |
The
Link Between Your ISP And Web Success
As a Web business owner, you probably realize the importance of your site's design and presentation. Your Internet business will not flourish all by itself. It takes hard work and dedication to build a great website. However, there's another important part of your online...
Looking Beyond W3C Compliance The W3C (World Wide Web Consortium) was established by the inventor of the web as we know it today, Sir Timothy Berners-Lee in 1994 to create a uniform set of standards for the internet and its continuing development.
Web-to-TV: A Star Is Born Every Second It won't be long until, if you so choose, that you can be a TV star, even if your show only shows up on a handful of sets. The technology is already in place to stream user-generated content onto the television screen, and scores of visionaries are working to make that...
Don't Risk Losing Your Business Domain Name! I Can't Remember Where I Purchased My Domain Name! Thousands of small business webmasters briefly lose their domain names at expiration, due to a simple lack of understanding about the roles of three key players in the drama domain name registrars, web hosts...
Counting The Hits Hit counters are very popular with novice web developers, but they lose favor as the developers gain skills. What is a hit, and why are hit counters not for serious developers? Just about every web developer, it seems, has tinkered with one of those free personal websites offered by an ISP.
|
 |
|
10.11.06
Uploading Files Like GMail Attachments
By
Pete Freitag
Google's GMail has a nice way of allowing you to add multiple attachments to an email.
Rather than showing you 10 file upload boxes at once, the user attaches a file, you can click a button to add another attachment. I had a client request this functionality in an app I am building for them today, and it was pretty easy to implement.
Here's the code:

And now here's the javascript function to add another input box:

Google also does something else that is pretty slick in Gmail with their attachment uploads - they appear to upload the file using AJAX. So you can type your email while your files are uploading. Perhaps I'll look into doing that in a future blog entry.
Comments
Related Entries
• Cheat Sheet Roundup - Over 30 Cheatsheets for developers - September 1, 2005
• Tracking JavaScript Events with Google Analytics - September 28, 2006
• Howto Build a Form That Isn't Annoying (Part 2) - May 3, 2006
• Styling Your forms with CSS and Labels - January 11, 2006
• Blocking Mozilla / Google Prefetch - April 6, 2005
* View Original Post
About
the Author:
Pete Freitag (http://www.petefreitag.com/) is a software engineer, and
web developer located in central new york. Pete specializes in the
HTTP protocol, web services, xml, java, and coldfusion. In 2003 Pete
published the ColdFusion MX Developers Cookbook with SAMs Publishing.
Pete owns a Firm called Foundeo (http://foundeo.com/) that specializes in Web Consulting, and Products for Web Developers.
|