upload an spreadsheet and receive an image

Discussion in 'Javascript' started by finecur, Mar 2, 2007.

  1. finecur

    finecur Guest

    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
    finecur, Mar 2, 2007
    #1
    1. Advertising

  2. finecur

    Darko Guest

    On Mar 2, 5:46 am, "finecur" <> wrote:
    > 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.
    Darko, Mar 2, 2007
    #2
    1. Advertising

  3. finecur

    Randy Webb Guest

    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/
    Randy Webb, Mar 2, 2007
    #3
  4. finecur

    Darko Guest

    On Mar 2, 4:27 pm, Randy Webb <> wrote:
    > 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. :)
    Darko, Mar 2, 2007
    #4
  5. finecur

    finecur Guest

    On Mar 2, 6:58 am, "Darko" <> wrote:
    > On Mar 2, 5:46 am, "finecur" <> wrote:
    >
    > > 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?
    finecur, Mar 3, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Server Control
    Replies:
    0
    Views:
    487
    Server Control
    Mar 16, 2006
  2. Pavils Jurjans

    File upload - receive side only

    Pavils Jurjans, Mar 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    732
  3. Morris Neuman

    Upload Excel Spreadsheet

    Morris Neuman, Feb 12, 2009, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    449
    Allen Chen [MSFT]
    Feb 17, 2009
  4. Barbara

    Upload excel spreadsheet

    Barbara, Oct 21, 2003, in forum: ASP General
    Replies:
    1
    Views:
    123
    Ray at
    Oct 21, 2003
  5. Ge  Cong
    Replies:
    0
    Views:
    98
    Ge Cong
    Mar 2, 2007
Loading...

Share This Page