~tim-alwaysreformed/reformedchurcheslocator/rcl-backbone-test_for_directory_type

« back to all changes in this revision

Viewing changes to evently/download/_init/after.js

  • Committer: Tim Black
  • Date: 2012-04-24 08:11:25 UTC
  • Revision ID: tim@alwaysreformed.com-20120424081125-uqcwoz2cx4ytso4b
Migrate code into couchapp

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function(){
 
2
 
 
3
        // ----------------- INITIALIZE PAGE --------------------------------
 
4
 
 
5
        var elem = $(this);
 
6
        // Hide subform
 
7
        elem.trigger('hide_subform');
 
8
        
 
9
        // TODO: Is this used anywhere?
 
10
        function test_regex_ajax(el){
 
11
                $.ajax({
 
12
                        type: "POST",
 
13
                        url: "/cong/test_regex_ajax",
 
14
                        data: ({regex : el.val()}),
 
15
            success: function(msg){
 
16
              $("#result_div").innerHTML = msg;
 
17
            },
 
18
            error: function(xhr, ajaxOptions, thrownError){
 
19
              $("#result_div").innerHTML = xhr.responseText;
 
20
            },
 
21
                        statusCode: {
 
22
                                500: function(data, textStatus, jqXHR){
 
23
                                        // TODO: Handle 500 errors here
 
24
                                        //alert(data);
 
25
                                        //alert(data.responseText)
 
26
                                }
 
27
                        }
 
28
                });
 
29
        }
 
30
        
 
31
}
 
 
b'\\ No newline at end of file'