homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Uploading Images with Captions
Easy and Efficient with Thumbnail Preview

 2:51 am on Feb 18, 2007 (gmt 0)

I want to make an image upload page that allows users to upload images and add captions in a nice neat way like you can on photobucket.com. It would also be nice if each image could be sent to a server side script that uploads the file and loads a thumbnail / preview of the image in an iframe. Any help or sample code you can provide would be much appreciated.



 9:35 am on Feb 18, 2007 (gmt 0)

you really need to upload images etc. with a sever side script. i don't think javascript will help you here because i don't think you can submit files using ajax (correct me if you can).


 1:23 pm on Feb 18, 2007 (gmt 0)

Sure you can upload files with AJAX, by passing the information to a serverside script - but it's not simple and it requires configuration modifications to the firefox brower ;-)

But putting that aside, the way to do this for your particular interest is the old hidden iframe method and getting your form to post to the iframe and then get the iframe to upload the file and then call the required javascript code to display the newly uploaded image.

Good luck.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved