This is a migrated thread and some comments may be shown as answers.

ajaxRequest cause check box shot delay

1 Answer 72 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Hoe Tat Kok
Top achievements
Rank 1
Hoe Tat Kok asked on 26 Jan 2010, 11:02 AM
I found that the client side Ajax request of Telerik have a shot delay when fire ajaxRequest event.

Currently I create a  RadGrid with check box. Each time user check on the check box it will update the database using AJAX without server postback so javascript is my choice.
I use prototype.js as my ajax request method and it working fine. Later I found that Telerik got own javascript AJAX request (ajaxRequest) method, I try to standardize my code all with Telerik only so I apply the ajaxRequest onto my code.
Telerik method work fine too, but do not no why the check box got shot delay each time I check on it.
Following code is my javascript use to call server update function. As in the code I only do a minimal changes. When remark the ajaxManager.ajaxRequest(pars)  ,the check box will be normal, else the delay happen.

 protoype.js
function UpdateValue(id,c, val) 
    var url = "fn.aspx"
    var pars = 'fn=u'
    pars = pars + '&' + 'id=' + id + '&c=' + c + '&val=' + val; 
 
    var myAjax = new Ajax.Request( 
        url,  
    { 
        method: 'post',  
        parameters: pars,  
        onComplete: response 
    });        

Telerik ajaxRequest
function UpdateValue(id,c, val) 
    var pars = 'fn=u'
    pars = pars + '&' + 'id=' + id + '&c=' + c + '&val=' + val; 
            
    var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); 
    ajaxManager.ajaxRequest(pars);         


1 Answer, 1 is accepted

Sort by
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 27 Jan 2010, 12:46 PM
Have you tried enabling RadCompression?

http://www.telerik.com/help/aspnet-ajax/radcompression.html
Tags
Ajax
Asked by
Hoe Tat Kok
Top achievements
Rank 1
Answers by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Share this question
or