AjaxManager and new attribute

4 posts, 0 answers
  1. peyman naji
    peyman naji avatar
    11 posts
    Member since:
    Nov 2009

    Posted 14 Dec 2009 Link to this post

    Hi Friends ,

    i want to add new attribute to ajaxmanager with serverside programming , and get value of attribute with javascript .
    i used this code  :

    add att :

    RadAjaxManager1.Attributes.Add("AjaxMode""BlackScreen");  

    get att :

        if(eventArgs.get_eventTargetElement().getAttribute('AjaxMode') == 'BlackScreen')    
                {     
                    GrayBackGroundFadeIn();    
                }    
            else    
                {    
                    SimpleAjaxLoaderFadeIn();    
                }    
            }    
     

    this code(above) work good for other control , by example : RadCombo  , Button , ...   but does not work with ajaxmanager , and always i have null value in  this code :

    eventArgs.get_eventTargetElement().getAttribute('AjaxMode')  

    how can i fix it and get attribute of ajaxmanager with JS  without problem ?

    Thanks
    peyman
  2. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 16 Dec 2009 Link to this post

    Hi peyman,

    I am afraid that custom attributes cannot be set to a RadAjaxManager.

    Please provide more information on your scenario and we will do our best to find a suitable workaround for you.

    Greetings,

    Mira
    the Telerik team

     


    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. peyman naji
    peyman naji avatar
    11 posts
    Member since:
    Nov 2009

    Posted 18 Dec 2009 Link to this post

    Hi dear Admin ,
    i have ajax manager include 6 ajax setting when ajax manager create a ajax request i want to know wich setting make ajax request for event on client side(onrequeststart) and this request have to category 1 - simple 2 - pro and i want add this as attribute on my setting , and with recive them onrequeststart, i make choose for what i want do next

    Thank u ,
    peyman
  4. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 23 Dec 2009 Link to this post

    Hi Peyman,

    The desired functionality can be achieved by adding the necessary attributes to the controls that initiate the AJAX request. Then, in the OnRequestStart client-side event handler, the initiator and its attributes can be easily accessed by the get_eventTarget() and get_eventTargetElement() methods of the passed event arguments parameter.

    Please give this suggestion a try and tell me how it goes.

    Greetings,
    Mira
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top