Solved

Uploadify jquery - process email script

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
This article discusses how to create an extensible mechanism for linked drop downs.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
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…

809 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