ajaxtest

Benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>


<table id="waiverNonChargeBackGrid" tabindex="0" cellspacing="0" cellpadding="0" border="0" role="grid" aria-multiselectable="true" aria-labelledby="gbox_waiverNonChargeBackGrid" class="ui-jqgrid-btable" style="width: 1307px;"><tbody><tr class="jqgfirstrow" role="row" style="height:auto"><td role="gridcell" style="height:0px;width:20px;"></td><td role="gridcell" style="height:0px;width:157px;"></td><td role="gridcell" style="height:0px;width:150px;"></td><td role="gridcell" style="height:0px;width:157px;"></td><td role="gridcell" style="height:0px;width:157px;"></td><td role="gridcell" style="height:0px;width:150px;"></td><td role="gridcell" style="height:0px;width:157px;"></td><td role="gridcell" style="height:0px;width:157px;display:none;"></td><td role="gridcell" style="height:0px;width:157px;display:none;"></td><td role="gridcell" style="height:0px;width:157px;"></td><td role="gridcell" style="height:0px;width:157px;"></td></tr><tr role="row" id="1" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr"><td role="gridcell" style="text-align:center;width: 20px;" aria-describedby="waiverNonChargeBackGrid_cb"><input role="checkbox" type="checkbox" id="jqg_waiverNonChargeBackGrid_1" class="cbox" name="jqg_waiverNonChargeBackGrid_1"></td><td role="gridcell" style="text-align:center;" title="19/12/2013 12:53:33" aria-describedby="waiverNonChargeBackGrid_waiverDate">19/12/2013 12:53:33</td><td role="gridcell" style="" title="Decrease BalanceIncrease Balance" aria-describedby="waiverNonChargeBackGrid_serviceLabelNCB"><select class=""><option value="Decrease Balance">Decrease Balance</option><option value="Increase Balance">Increase Balance</option></select></td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_amount"><input type="text" class="amountNCB" name="amountVal" value="0.0"></td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_appliedBy">&nbsp;</td><td role="gridcell" style="" title="Choose...SMSTalk Time TransferRecharge" aria-describedby="waiverNonChargeBackGrid_serviceNameNCB"><select id="serviceNameNCB1" class="serviceNameNCB"><option value="0">Choose...</option><option value="SMS">SMS</option><option value="Talk Time Transfer">Talk Time Transfer</option><option value="Recharge">Recharge</option></select></td><td role="gridcell" style="" title="Choose reason..." aria-describedby="waiverNonChargeBackGrid_waiverReason"><select id="waiverReasonNCB1" class="waiverReasonNCB"><option value="0">Choose reason...</option><option>Charged for toll free SMS</option><option>Incorrect Billing - SMS</option><option>Incorrect Billing - SMS on Roaming</option></select></td><td role="gridcell" style="text-align:center;display:none;" title="" aria-describedby="waiverNonChargeBackGrid_waiverStatus">&nbsp;</td><td role="gridcell" style="text-align:center;display:none;" title="" aria-describedby="waiverNonChargeBackGrid_errorMessage">&nbsp;</td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_comments"><input type="text" name="comments"></td><td role="gridcell" style="text-align:center;" title="T-20962" aria-describedby="waiverNonChargeBackGrid_transactionId">T-20962</td></tr><tr role="row" id="2" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr"><td role="gridcell" style="text-align:center;width: 20px;" aria-describedby="waiverNonChargeBackGrid_cb"><input role="checkbox" type="checkbox" id="jqg_waiverNonChargeBackGrid_1" class="cbox" name="jqg_waiverNonChargeBackGrid_1"></td><td role="gridcell" style="text-align:center;" title="19/12/2013 12:53:33" aria-describedby="waiverNonChargeBackGrid_waiverDate">19/12/2013 12:53:42</td><td role="gridcell" style="" title="Decrease BalanceIncrease Balance" aria-describedby="waiverNonChargeBackGrid_serviceLabelNCB"><select class=""><option value="Decrease Balance">Decrease Balance</option><option value="Increase Balance">Increase Balance</option></select></td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_amount"><input type="text" class="amountNCB" name="amountVal" value="0.0"></td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_appliedBy">&nbsp;</td><td role="gridcell" style="" title="Choose...SMSTalk Time TransferRecharge" aria-describedby="waiverNonChargeBackGrid_serviceNameNCB"><select id="serviceNameNCB2" class="serviceNameNCB"><option value="0">Choose...</option><option value="SMS">SMS</option><option value="Talk Time Transfer">Talk Time Transfer</option><option value="Recharge">Recharge</option></select></td><td role="gridcell" style="" title="Choose reason..." aria-describedby="waiverNonChargeBackGrid_waiverReason"><select id="waiverReasonNCB2" class="waiverReasonNCB"><option value="0">Choose reason...</option></select></td><td role="gridcell" style="text-align:center;display:none;" title="" aria-describedby="waiverNonChargeBackGrid_waiverStatus">&nbsp;</td><td role="gridcell" style="text-align:center;display:none;" title="" aria-describedby="waiverNonChargeBackGrid_errorMessage">&nbsp;</td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_comments"><input type="text" name="comments"></td><td role="gridcell" style="text-align:center;" title="T-20962" aria-describedby="waiverNonChargeBackGrid_transactionId">T-22537</td></tr><tr role="row" id="3" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr"><td role="gridcell" style="text-align:center;width: 20px;" aria-describedby="waiverNonChargeBackGrid_cb"><input role="checkbox" type="checkbox" id="jqg_waiverNonChargeBackGrid_1" class="cbox" name="jqg_waiverNonChargeBackGrid_1"></td><td role="gridcell" style="text-align:center;" title="19/12/2013 12:53:33" aria-describedby="waiverNonChargeBackGrid_waiverDate">19/12/2013 12:53:44</td><td role="gridcell" style="" title="Decrease BalanceIncrease Balance" aria-describedby="waiverNonChargeBackGrid_serviceLabelNCB"><select class=""><option value="Decrease Balance">Decrease Balance</option><option value="Increase Balance">Increase Balance</option></select></td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_amount"><input type="text" class="amountNCB" name="amountVal" value="0.0"></td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_appliedBy">&nbsp;</td><td role="gridcell" style="" title="Choose...SMSTalk Time TransferRecharge" aria-describedby="waiverNonChargeBackGrid_serviceNameNCB"><select id="serviceNameNCB3" class="serviceNameNCB"><option value="0">Choose...</option><option value="SMS">SMS</option><option value="Talk Time Transfer">Talk Time Transfer</option><option value="Recharge">Recharge</option></select></td><td role="gridcell" style="" title="Choose reason..." aria-describedby="waiverNonChargeBackGrid_waiverReason"><select id="waiverReasonNCB3" class="waiverReasonNCB"><option value="0">Choose reason...</option></select></td><td role="gridcell" style="text-align:center;display:none;" title="" aria-describedby="waiverNonChargeBackGrid_waiverStatus">&nbsp;</td><td role="gridcell" style="text-align:center;display:none;" title="" aria-describedby="waiverNonChargeBackGrid_errorMessage">&nbsp;</td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_comments"><input type="text" name="comments"></td><td role="gridcell" style="text-align:center;" title="T-20962" aria-describedby="waiverNonChargeBackGrid_transactionId">T-26973</td></tr><tr role="row" id="4" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr ui-state-highlight ui-state-hover"><td role="gridcell" style="text-align:center;width: 20px;" aria-describedby="waiverNonChargeBackGrid_cb"><input role="checkbox" type="checkbox" id="jqg_waiverNonChargeBackGrid_1" class="cbox" name="jqg_waiverNonChargeBackGrid_1"></td><td role="gridcell" style="text-align:center;" title="19/12/2013 12:53:33" aria-describedby="waiverNonChargeBackGrid_waiverDate">19/12/2013 12:53:44</td><td role="gridcell" style="" title="Decrease BalanceIncrease Balance" aria-describedby="waiverNonChargeBackGrid_serviceLabelNCB"><select class=""><option value="Decrease Balance">Decrease Balance</option><option value="Increase Balance">Increase Balance</option></select></td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_amount"><input type="text" class="amountNCB" name="amountVal" value="0.0"></td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_appliedBy">&nbsp;</td><td role="gridcell" style="" title="Choose...SMSTalk Time TransferRecharge" aria-describedby="waiverNonChargeBackGrid_serviceNameNCB"><select id="serviceNameNCB4" class="serviceNameNCB"><option value="0">Choose...</option><option value="SMS">SMS</option><option value="Talk Time Transfer">Talk Time Transfer</option><option value="Recharge">Recharge</option></select></td><td role="gridcell" style="" title="Choose reason..." aria-describedby="waiverNonChargeBackGrid_waiverReason"><select id="waiverReasonNCB4" class="waiverReasonNCB"><option value="0">Choose reason...</option><option>Wrong Recharge</option><option>RCV Damaged/Unable to Recharge thru RCV</option><option>RCV Amount not credited</option><option>RCV Amount mismatch</option></select></td><td role="gridcell" style="text-align:center;display:none;" title="" aria-describedby="waiverNonChargeBackGrid_waiverStatus">&nbsp;</td><td role="gridcell" style="text-align:center;display:none;" title="" aria-describedby="waiverNonChargeBackGrid_errorMessage">&nbsp;</td><td role="gridcell" style="text-align:center;" title="" aria-describedby="waiverNonChargeBackGrid_comments"><input type="text" name="comments"></td><td role="gridcell" style="text-align:center;" title="T-20962" aria-describedby="waiverNonChargeBackGrid_transactionId">T-20756</td></tr></tbody></table>

Test runner

Ready to run.

Testing in
TestOps/sec
ajax
// async test
$(document).on('change', 'select[id^="serviceNameNCB"]', function() {
                        var thisNum = this.id;
                        var val = thisNum.replace ( /[^\d.]/g, '');
                        alert(this.id +"========" + parseInt(val));
                        $.ajax({
                                url:"passNonChargeBackWaiver",
                                data : {product : this.value},
                                dataType: "json",
                                type : 'POST',
                                beforeSend: function(){
                                        var msg = "<div id='progress' style='position:absolute; left:50%; top:50%; margin:-60px 0 0 -12px; width:120px; height:24px; line-height:24px; border:solid 2px orange; background:white; text-align:center; font-size:14px; font-weight:bold;'>Loading...</div>";
                                        $('.nonChargeBackWaivers').css('position','relative').append(msg);
                                },
                                success: function(data){
                                        var opt = "<option value='0'>Choose reason...</option>", $this = $('.ui-state-highlight');
                                        $('select#waiverReasonNCB'+val).html(opt);
                                        
                                        $.each(data, function(i, itm){
                                                $.each(itm, function(i, a){
                                                        $.each(a, function(i, j){
                                                                
                                                                opt = "<option>"+j.lovVal+"</option>";
                                                                $('select#waiverReasonNCB'+val).append(opt);
                                                        });
                                                });
                                        });
                                        
                                        //console.log($this.find('td[aria-describedby="waiverNonChargeBackGrid_waiverReason"] select.waiverReasonNCB'));
                                },
                                complete: function(){
                                        $('#progress').delay(2000).remove();
                                },
                                error: function(err){
                                        //alert('error :'+err);
                                }
                        });
                        
                        
                });
ready
ajax
// async test
$(document).on('change', 'select[id^="serviceNameNCB"]', function() {
                        var thisNum = this.id;
                        var val = thisNum.replace ( /[^\d.]/g, '');
                        alert(this.id +"========" + parseInt(val));
                        $.ajax({
                                url:"passNonChargeBackWaiver",
                                data : {product : this.value},
                                dataType: "json",
                                type : 'POST',
                                beforeSend: function(){
                                        var msg = "<div id='progress' style='position:absolute; left:50%; top:50%; margin:-60px 0 0 -12px; width:120px; height:24px; line-height:24px; border:solid 2px orange; background:white; text-align:center; font-size:14px; font-weight:bold;'>Loading...</div>";
                                        $('.nonChargeBackWaivers').css('position','relative').append(msg);
                                },
                                success: function(data){
                                        var opt = "<option value='0'>Choose reason...</option>", $this = $('.ui-state-highlight');
                                        $('select#waiverReasonNCB'+val).html(opt);
                                        
                                        $.each(data, function(i, itm){
                                                $.each(itm, function(i, a){
                                                        $.each(a, function(i, j){
                                                                
                                                                opt = "<option>"+j.lovVal+"</option>";
                                                                $('select#waiverReasonNCB'+val).append(opt);
                                                        });
                                                });
                                        });
                                        
                                        //console.log($this.find('td[aria-describedby="waiverNonChargeBackGrid_waiverReason"] select.waiverReasonNCB'));
                                },
                                complete: function(){
                                        $('#progress').delay(2000).remove();
                                },
                                error: function(err){
                                        //alert('error :'+err);
                                }
                        });
                        
                        
                });
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.