bigdawggi Posted April 20, 2009 Share Posted April 20, 2009 Hi everyone, I have done some googling on this, but haven't found anything useful. What I'm trying to accomplish is this: 1) User clicks custom button 2) That button pops up a file browser window, from which the user can choose which file to upload 3) When they select the file, it uploads that automatically. I've thought of dynamically appending a form, with an input type="file", but I can't seem to find how to automatically have that 'browse' button activate (and bring up the file system browser automatically that way). After selection, I know I can bind to the 'onChange' event, and submit the form. The whole idea is to have one button that does all the action for us, and the user never sees the form; they just get a filesystem popup where they can select the file and then it will automatically upload via ajax (so they can preview it). Thoughts/help are greatly appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/154871-solved-one-button-to-upload-a-file/ Share on other sites More sharing options...
envexlabs Posted April 20, 2009 Share Posted April 20, 2009 http://digitarald.de/project/fancyupload/ It's a mootools, ajax, swf uploader. Works like a charm. Quote Link to comment https://forums.phpfreaks.com/topic/154871-solved-one-button-to-upload-a-file/#findComment-814549 Share on other sites More sharing options...
bigdawggi Posted April 20, 2009 Author Share Posted April 20, 2009 Thanks for the tip! We're already loading jQuery, so I'll check to see if they have one as well, and if not probably go w/ the mootools option. Quote Link to comment https://forums.phpfreaks.com/topic/154871-solved-one-button-to-upload-a-file/#findComment-814571 Share on other sites More sharing options...
bigdawggi Posted April 20, 2009 Author Share Posted April 20, 2009 ran across this as well if it might come in handy to someone... http://blog.codeville.net/2008/11/24/jquery-ajax-uploader-plugin-with-progress-bar/ it uses swfupload. Quote Link to comment https://forums.phpfreaks.com/topic/154871-solved-one-button-to-upload-a-file/#findComment-814581 Share on other sites More sharing options...
envexlabs Posted April 20, 2009 Share Posted April 20, 2009 Using jquery with mootools is relatively simple, it just takes a bit of tweaking on jquery's end. var $j = jQuery.noConflict(); You have to rewrite all instances of $ and append the j. That way mootools can use $ and jquery uses $j Quote Link to comment https://forums.phpfreaks.com/topic/154871-solved-one-button-to-upload-a-file/#findComment-814583 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.