can i upload a file(image) without submitting the form..
Basically i want to create a webpage where a user can upload an image and preview it side by side but this should not submit my form.
i dont wanna use jquery
can i upload a file(image) without submitting the form..
Basically i want to create a webpage where a user can upload an image and preview it side by side but this should not submit my form.
i dont wanna use jquery
You can have two forms on the page. One to upload the image and other one for something else. Just don't nest them.
I think this is what you want But it uses PHP for sever side you can use what ever you want!

All you have to do is create a page which will handle the ajax call, which is saving the image and returning string "true" in case of succeeds. and for Java this (Handling Form-based File Upload with Java Servlet or JSP) should help you.
Check this one out ioncannon.net