Add new attribute to ajaxmanager And get it ...

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

    Posted 04 Dec 2009 Link to this post

    hi friends .,

    i need to add new attribute to ajax manager ,  i used this code in behind code :
    RadAjaxManager1.Attributes.Add("AjaxMode""BlackScreen"); 

    Also i used OnRequestStart  clinetside event in java script ... i want when request start , get value of attribute (AjaxMode) of control that make request . how can i do it with java script ? 

    thank u very much ,

    Regards,
    Peyman

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Dec 2009 Link to this post

    Hi Peyman,

    I believe you cannot access the custom attributes from client side, which is added from code. Probably you can use one HiddenField to store the value and access the value in the client event instead of setting attribute for the control.

    - setting value from code behind:
           HiddenField1.Value = "BlackScreen";

    - access value from client side:
          document.getElementById("HiddenField1").value

    Hope this helps,
    Shinu.
  3. peyman naji
    peyman naji avatar
    11 posts
    Member since:
    Nov 2009

    Posted 05 Dec 2009 Link to this post

    Hi Shinu , Thank u so much for Guide ...

    Also i use this code for getting Attribute from Control that fire OnRequestStart Event :
        if(eventArgs.get_eventTargetElement().getAttribute('AjaxMode') == 'BlackScreen'
                {  
                    GrayBackGroundFadeIn(); 
                } 
            else 
                { 
                    SimpleAjaxLoaderFadeIn(); 
                } 
            } 

    this code 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'

    Where is the problem ?!!!


    thank u so much

    Regards ,
    Peyman
  4. peyman naji
    peyman naji avatar
    11 posts
    Member since:
    Nov 2009

    Posted 13 Dec 2009 Link to this post

    Friends ! Plz Guide me .

    Thanks .

Back to Top