Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Dec 2009
    Posts
    20
    Thanks
    4
    Thanked 0 Times in 0 Posts

    file uploading in ajax

    how can we do ajax file uploading in html through javascript??

  • #2
    bdl
    bdl is offline
    Regular Coder
    Join Date
    Apr 2007
    Location
    Camarillo, CA US
    Posts
    590
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Technically, you can't. JavaScript cannot access local files on the filesystem as a security measure. You can, however, use a method that utilizes Flash or an IFRAME element to approximate an "Ajax file upload". There are dozens if not hundreds of good tutorials, examples and frameworks online for this. Please do a basic Google search.

  • Users who have thanked bdl for this post:

    ajaybabu.darna (02-17-2010)

  • #3
    eak
    eak is offline
    Regular Coder eak's Avatar
    Join Date
    Jun 2002
    Location
    Nashville, TN
    Posts
    354
    Thanks
    0
    Thanked 26 Times in 26 Posts
    eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."

  • Users who have thanked eak for this post:

    ajaybabu.darna (02-17-2010)

  • #4
    New Coder
    Join Date
    Dec 2009
    Posts
    20
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by bdl View Post
    Technically, you can't. JavaScript cannot access local files on the filesystem as a security measure. You can, however, use a method that utilizes Flash or an IFRAME element to approximate an "Ajax file upload". There are dozens if not hundreds of good tutorials, examples and frameworks online for this. Please do a basic Google search.
    Hello sir...
    sorry i dont know whether this question related to this site or not
    i have uploaded as u said...
    the problem is that when i am doing other operation like save or edit,
    i am using a java servlet to the database operation after completion of operation i am redirecting to one jsp.

    Actually i need to perform save two types of data....
    1. a plain text or 2. a uploaded file like image
    it is working fine when i am using plain text and not uploading anything ..and redirecting to a jsp.
    But it is not working fine after uploading using this ajax and iframe.All database operations are happening except this redirect operation, can u please tell me the solution .........
    or atleast where can i find solution for this type of uploading

  • #5
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How to upload a particular file using jsp or servlet coding and run in firefox?

  • #6
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hello friend , i also want to know answer of this question .i am designing an website and i am face some problem in that particular task. www.healthinsuranceireland.org


  •  

    Posting Permissions

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