Friday, November 21, 2014

Send Ajax request in PERL


var d = new Date();
                var wst = d.getTime();
                \$.ajax({
                        type: "POST",
                        url: "/page.pl",
                        data: { wst:wst, frompage:fromPage ,course:courseId, county:county, userid:userId, regulator:regulator },
                        success: function (result) {
                                alert(result);
                        },
                        dataType: "html"
                });

  
  sub processUpdateRegulator {
 
   my $self = shift;
   my $q = $self->query();
   my $formData=Ids::Signup::getFormData($self);
   my $userId = $formData->{userid};
   my $userName = $formData->{username};  
  }