Irresistable Posted January 5, 2010 Share Posted January 5, 2010 I've got a fully working contact form, and I've seen single email attachments which simply an input file. Although what I'm looking for is something like Hotmail. However the upload field stays there, you click browse find your file and click ok. That then disappears from the textbox, and ends up in a field above or wherever I wanted it to be. Also with a delete button. I have seen something similar to this but can't find it again. Does anyone have any tutorials, or a code they can provide for something like this? Quote Link to comment Share on other sites More sharing options...
Irresistable Posted January 5, 2010 Author Share Posted January 5, 2010 Idea: http://www.flashcomponents.net/component/contact_form_mail_with_attachments.html You have to buy it, but the attachments on there, is a reasonable idea that I like, except with no flash. Quote Link to comment Share on other sites More sharing options...
ChaosKnight Posted January 5, 2010 Share Posted January 5, 2010 You can do that with jQuery... Correct me if I'm wrong, you want do display all the files underneath each other? Take a look at: http://www.fyneworks.com/jquery/multiple-file-upload/ When you click the choose file button some text with an "X" next to it appears... If you don't have jQuery, I highly recommend you to start using it, it prevents a lot of headaches... You can get a tutorial on it here: http://www.w3schools.com/jquery/default.asp And here is the official documentation, if you go through it thoroughly you should be able to know almost everything about it: http://docs.jquery.com/Tutorials That jQuery Multiple File Upload thing is a great plugin, you can even write plugins and then share it with the jQuery community.. I hope this helps a bit... Quote Link to comment Share on other sites More sharing options...
Irresistable Posted January 5, 2010 Author Share Posted January 5, 2010 Yes, that is perfect. I downloaded the files, but there is many files, opening index.html it just says "this has been moved to .. " with the link. I can't find the manual tutorial either. Can you help? Quote Link to comment Share on other sites More sharing options...
ChaosKnight Posted January 5, 2010 Share Posted January 5, 2010 I found a prettier looking multi file upload for you at: http://www.uploadify.com/ but this uses a type of flash though, but luckily there is a jQuery plugin that covers that part: http://jquery.thewikies.com/swfobject/ The SWFObject is an addon for jQuery that offers unique functionality to embed Flash content using the internal jQuery API Don't worry, the uploadify download comes with a flash object to implement in the zip file, after that you include the jquery-1.3.2.min.js, uploadify.js, uploadify.css and swfobject.js into your page... You then implement it like so: <input id="fileInput" name="fileInput" type="file" /> <script type="text/javascript">// <![CDATA[ $(document).ready(function() { $('#fileInput').uploadify({ 'uploader' : 'uploadify.swf', 'script' : 'uploadify.php', 'cancelImg' : 'cancel.png', 'auto' : true, 'folder' : '/uploads' }); }); // ]]></script> This should work... To see the original implementation details of this plugin, go to: http://www.uploadify.com/implementation/ Hope this is what you wanted Quote Link to comment Share on other sites More sharing options...
Irresistable Posted January 5, 2010 Author Share Posted January 5, 2010 http://www.uploadify.com/demo/ The multiple file upload on there looks good. Although, how would I put it as an email attachment? The style does look good however with my contact form.. i'd like the files to be automatically uploaded instead of clicking the upload button, and without removing it when the file has uploaded. Then when a user clicks submit, to send the form- the files get sent with it. I'm not if uploading the images to the directory "uploads" would be used, because it might get mixed up. Unless when the file gets uploaded, the file name gets an id, and a session id gets created or what? I'm having a look at it now, but can you help me with that? Quote Link to comment 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.