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

AjaxManager and new attribute

3 Answers 63 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
peyman naji
Top achievements
Rank 1
peyman naji asked on 14 Dec 2009, 07:32 AM
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

3 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 16 Dec 2009, 12:17 PM
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.
0
peyman naji
Top achievements
Rank 1
answered on 18 Dec 2009, 10:28 AM
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
0
Mira
Telerik team
answered on 23 Dec 2009, 10:46 AM
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.
Tags
Ajax
Asked by
peyman naji
Top achievements
Rank 1
Answers by
Mira
Telerik team
peyman naji
Top achievements
Rank 1
Share this question
or