Solved

Posting files with Jquery AJAX

Posted on 2015-01-20
1
56 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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…

746 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

12 Experts available now in Live!

Get 1:1 Help Now