Click here to Skip to main content
15,888,212 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to upload a file on button click and after that i want user to redirect another page.
This can easily done with the help of fileuploader and using another button to upload file, but i want to perform all this process on single button. I googled and found server article which suggest to me to use AJAX and JQuery. I tried with Jquery but it seems difficult for me to customize this article's. Is there any other way to upload file and later redirect to other page? Thanks in advance :)
Posted

1 solution

Quote:
Uploading a file in pure Javascript in the method that you are mentioning is not possible - you have to communicate with a server of some sorts.

You could try using the following method suggested here or consider looking into using the HTML5 File API, which would allow this kind of functionality.



Reference :- exact solution what you are looking for : :)
Creating a File Uploader Using JavaScript and HTML 5[^]

Regards,
Praveen Nelge
 
Share this answer
 
Comments
Kalpesh Bhadra 18-Feb-14 5:24am    
Thank you Praveen. However i can not use HTML5 because
1)browser compatibility,
2)I am not storing file on drive,
3)Before storing them into DB i'm performing some operation in the file.
So HTML5 is not a solution.
I think this(http://www.aspsnippets.com/Green/Articles/Upload-files-with-Progress-Bar-in-ASPNet-using-jQuery.aspx") can be solution but i'am not able to customize it to redirect and remove animation that are performed when file is uploading

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900