Advertisement

02.23.2008 at 09:26AM PST, ID: 23187243
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.8

File Upload with Ajax

Asked by TheFoot in JavaScript, Active Server Pages (ASP)

Tags:

Hi.

I am currently using prototype.js version 1.6.1 for ajax requests.  I need to upload files without refreshing the page.  Can this be done with prototype.js's ajax objects and methods?  

The only other way that I can find to acheive this is using a hidden iframe.  However the uploaded images are being saved direct to the database as binary data.  How would my page's JS be able to find out if the file was successfully uploaded?

Does anybody have any other ideas of how to post a file to the server using ajax?  Or if a hidden iframe is the only way to do this, can someone post some sample code of how this is done please?  

Basically the uploaded image is saved to the database as a slide in a slideshow.  It is not always a new record (could be, but could also be an image replacement), so how can I check that the file has finished uploading..?

Perhaps the iframe server-script could save the image as a temporary file, and then the ajax server-script could check for the existence of that file, then save it to the database and remove the temp file?  Seems a bit like cracking a walnut with a sledgehammer really.. surely there must be an easier/smoother way?

Thanks,

TheFoot

PS.  I am targetting IE7 and FF2 browsers (its a web application rather than a public website).  I am using prototype and script.aculo.us.Start Free Trial
[+][-]02.23.2008 at 09:28AM PST, ID: 20965715

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.23.2008 at 10:05AM PST, ID: 20965882

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Active Server Pages (ASP)
Tags: ajax file upload iframe javascript prototype
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]02.24.2008 at 08:17AM PST, ID: 20970371

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906