Solved

Uploadify jquery - process email script

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

707 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

13 Experts available now in Live!

Get 1:1 Help Now