Connecting Tech Pros Worldwide Help | Site Map

upload an spreadsheet and receive an image

finecur
Guest
 
Posts: n/a
#1: Mar 2 '07
I am working on the project. Here is the work flow.
Quote:
>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

Darko
Guest
 
Posts: n/a
#2: Mar 2 '07

re: upload an spreadsheet and receive an image


On Mar 2, 5:46 am, "finecur" <fine...@yahoo.comwrote:
Quote:
I am working on the project. Here is the work flow.
>
Quote:
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.

Randy Webb
Guest
 
Posts: n/a
#3: Mar 2 '07

re: upload an spreadsheet and receive an image


Darko said the following on 3/2/2007 9:58 AM:
Quote:
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/
Darko
Guest
 
Posts: n/a
#4: Mar 2 '07

re: upload an spreadsheet and receive an image


On Mar 2, 4:27 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
Quote:
Darkosaid the following on 3/2/2007 9:58 AM:
>
Quote:
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. :)

finecur
Guest
 
Posts: n/a
#5: Mar 3 '07

re: upload an spreadsheet and receive an image


On Mar 2, 6:58 am, "Darko" <darko.maksimo...@gmail.comwrote:
Quote:
On Mar 2, 5:46 am, "finecur" <fine...@yahoo.comwrote:
>
Quote:
I am working on the project. Here is the work flow.
>
Quote:
Quote:
>From a web page, user will upload a Microsoft Excel file to the
>
Quote:
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.
>
Quote:
How can I do it?
>
Quote:
Thanks,
>
Quote:
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?



Closed Thread