Connecting Tech Pros Worldwide Help | Site Map

upload an spreadsheet and receive an image

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 2nd, 2007, 03:55 AM
finecur
Guest
 
Posts: n/a
Default upload an spreadsheet and receive an image

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


  #2  
Old March 2nd, 2007, 02:05 PM
Darko
Guest
 
Posts: n/a
Default 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.

  #3  
Old March 2nd, 2007, 02:35 PM
Randy Webb
Guest
 
Posts: n/a
Default 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/
  #4  
Old March 2nd, 2007, 09:15 PM
Darko
Guest
 
Posts: n/a
Default 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. :)

  #5  
Old March 3rd, 2007, 12:55 AM
finecur
Guest
 
Posts: n/a
Default 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?



 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.