Hello
I want to know is there any way to upload a file using Ajax without submiting the page(also without using IFrame).
If you have a solution please provide a sample code.
Thanks.
File Uploadin by Ajax
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
-
nickvd
- DevNet Resident
- Posts: 1027
- Joined: Thu Mar 10, 2005 5:27 pm
- Location: Southern Ontario
- Contact:
The way I have it working is very degradable... On page load, it removes the submit button and the file upload field, appends the iframe which has a document that replicates the file upload field and the submit button (future versions will use the dom to clone the existing fields), on the iframe page load, it replicates all the existing fields into the current (iframe) page, on submit, it will do the upload and reload the iframe, which causes the page to output more onload javascript which will call a function in the parent frame (the actual page).
It works very seamlessly, with or without javascript...
It works very seamlessly, with or without javascript...
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US