dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: File Transfer with JavaScript

  1. #1
    Join Date
    Oct 2006
    Posts
    2

    Unhappy File Transfer with JavaScript

    Hi,

    I am trying to use javascript to download a binary file when a button is clicked, using XMLHTTPRequest/HTTPRequest object.

    I searched google, but I couldn't find anything recognizable. Please let me know if you have any tutotials or sample code.

    PS: I did file code to read xml files using HTTPRequest object; just am not sure how to implement that for binary file and have the browse prompt the user to save the file.

    Thanks,
    -Spell

  2. #2
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    You can not prompt save with the XMLHttpRequest object.

    Set a hidden iframe to the file source and the browser should prompt save automatically. (that is if the borwser is set up not to handle that type of file)

    Eric

  3. #3
    Join Date
    Oct 2006
    Posts
    2
    Thanks....is iframe support available in IE and Mozilla/FireFox? I thought iframe is being removed from the XHTML Specification?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles