Solved

Posting files with Jquery AJAX

Posted on 2015-01-20
1
63 Views
Last Modified: 2015-02-02
I am using

		$.ajax({
						type: "POST",
						dataType: 'json',
						contentType:attr("enctype", "multipart/form-data"),
						url: "index.php",
						data: $(form).serialize(),
						success: function(response) {

Open in new window


I read somewhere that not all browsers will serialize file input fields, please advise
0
Comment
Question by:Mark
1 Comment
 
LVL 32

Accepted Solution

by:
Big Monty earned 500 total points
ID: 40560660
check out thejQuery Form Plugin:

http://jquery.malsup.com/form/
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now