Solved

Uploadify jquery - process email script

Posted on 2011-02-16
3
494 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
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…

828 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