?
Solved

Uploadify jquery - process email script

Posted on 2011-02-16
3
Medium Priority
?
502 Views
Last Modified: 2012-06-27
'onAllComplete' : function(event,data) {
      alert(data.filesUploaded + ' files uploaded successfully!');
     
    }
        });

When an upload is complete the above function kicks in... how would I call a php email script from this function? I want to send out a simple email every time an upload occurs. Thanks
0
Comment
Question by:pixelscape
  • 2
3 Comments
 
LVL 15

Expert Comment

by:Tomarse111
ID: 34909016
Just after your alert you would need to do a jQuery post or get (AJAX call) to your PHP page, passing any relevant variables across through their options.

This would then trigger your email page.

More info can be found here:

http://api.jquery.com/jQuery.ajax/
http://api.jquery.com/jQuery.post/
http://api.jquery.com/jQuery.get/
0
 

Author Comment

by:pixelscape
ID: 34909318

Thanks for the quick response. I don't need to pass anything, just call the php email file.

I put this beneath the alert...
$.post("send_upload.php");

What am I missing?
0
 
LVL 15

Accepted Solution

by:
Tomarse111 earned 2000 total points
ID: 34909801
That should be enough ... you can add a function on the end to see if it has been triggered or use something like Firebug for Firefox to monitor the AJAX post and response ...

$.post("send_upload.php",function(data){
alert('complete')
});

you could also check to see if error has occured during the AJAX call. Again check the URL's I posted in my first post for the correct syntax.

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month15 days, 23 hours left to enroll

850 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