upload an spreadsheet and receive an image

F

finecur

I am working on the project. Here is the work flow.
From a web page, user will upload a Microsoft Excel file to the
server. The server will do some calculation based on the data in the
file and return an image in Jpg format. The returned image will be
displayed at the same web page. I do not want to refresh the page so
that the user get better experience.

How can I do it?

Thanks,

ff
 
D

Darko

I am working on the project. Here is the work flow.


server. The server will do some calculation based on the data in the
file and return an image in Jpg format. The returned image will be
displayed at the same web page. I do not want to refresh the page so
that the user get better experience.

How can I do it?

Thanks,

ff

Use AJAX, it's already a used-up question. Upload the file in
background, using the post method, and receive the response from the
same AJAX handler. Once you receive the response, you can handle it at
will.
However, the image part is tricky. The html image-tags don't receive
source as binary data, but rather (and only) as the string referring
to the address of the image, whether it's a static image or server-
generated image. So, you can't get binary data from the ajax response
that you would "insert" into the image container, but you can only
maybe get ajax to respond with a url of the image and set that to be
the source of the image in the page.
 
R

Randy Webb

Darko said the following on 3/2/2007 9:58 AM:
maybe get ajax to respond with a url of the image and set that to be
the source of the image in the page.

Getting the server to respond with a simple text of the image name and
then changing the image is the simplest, easiest and most reliable way
to do it.
 
D

Darko

Darkosaid the following on 3/2/2007 9:58 AM:


Getting the server to respond with a simple text of the image name and
then changing the image is the simplest, easiest and most reliable way
to do it.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/

Thank you. :)
 
F

finecur

Use AJAX, it's already a used-up question. Upload the file in
background, using the post method, and receive the response from the
same AJAX handler. Once you receive the response, you can handle it at
will.

Could you tell me how to do it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top