469,921 Members | 2,176 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,921 developers. It's quick & easy.

upload an spreadsheet and receive an image

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

Mar 2 '07 #1
4 1676
On Mar 2, 5:46 am, "finecur" <fine...@yahoo.comwrote:
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
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.

Mar 2 '07 #2
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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 2 '07 #3
On Mar 2, 4:27 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
Darkosaid 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.

--
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. :)

Mar 2 '07 #4
On Mar 2, 6:58 am, "Darko" <darko.maksimo...@gmail.comwrote:
On Mar 2, 5:46 am, "finecur" <fine...@yahoo.comwrote:
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

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?

Mar 3 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by dave | last post: by
2 posts views Thread by Dynamo | last post: by
reply views Thread by BDKiii | last post: by
reply views Thread by SEMIH DEMIR | last post: by
4 posts views Thread by Jim Michaels | last post: by
reply views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.