How are you using this constructor? Where are you calling the methods?

On Nov 25, 1:08 am, Jeremy <[EMAIL PROTECTED]> wrote:
>  Could someone help me figure out how to load the total number
> returned in the post request into the total variable of the object?
>
> Currently, the value of this.total remains zero through the script
> even though the post returns 12.
>
> $(document).ready(function() {
>
> function ajax_page(statsendpoint) {
>
>   this.total = 0;
>
>         this.updtotal = function(response){
>                 this.total=response.totalnum;
>         }
>
>         this.load_pagination = function() {
>                 $.post(this.statsendpoint,{
>                                          rev_usr_user_id_reviewed: 5
>                                    }, this.updtotal,"json");
>         }
>
> }

Reply via email to