ajax method

  1. #1

    ajax method

    question: you can call a coolite ajaxmethod inside any javascript function right? whenever i do "Coolite.AjaxMethods.serverFunction()" i am getting a javascript error saying object does not support property or method, please help
  2. #2

    RE: ajax method

    Hi,

    When define this function? Also what rendered to the page? Can you post Coolite script block which rendered to the page

    Vladimir Shcheglov
    Sr. Developer
  3. #3

    RE: ajax method

    ok, im creating a dynamic window using this javascript code, then inside that window is a toolbar with a button which calls a function that has an ajax method inside it.. of course in the server side code i got a public non-static function "check()" with an [AjaxMethod] attribute

    
     var win;
            win = Ext.getCmp('extwin_' + dv.getRecord(node).get('id'));
            if(!win)
            {
                var toolbar = [{
                        tooltip:{title:'Unpublish', text:'Unpublish the selected question(s)'},
                        text: '',
                        iconCls:'icon-check',
                        handler: checkSelection ,
                        scope:this
                    }]
    
                 win = new Ext.Window({renderTo: Ext.getBody .............
    
           } 
        
       
         var checkSelection = function()
        {
            Coolite.AjaxMethods.check();
        }

    can this be done with this button? because in the examples, the ajax method was triggered by a coolite control

  4. #4

    RE: ajax method

    Hi,

    I mean where define ajax method: in page, in master page or in user control? May be it is id's issue (because if ajax method define in master page or in user control then need to add client id to the calling or use AjaxMethodProxyID attribute - see http://forums.ext.net/showthread.php?1372


    Also it can be a cache issue - several days ago we added ignore ajax method cache under debug. You can update from SVN and retest or restart your web server to clear cache (IIS or local web development server)


    Can you investigate**generated *Coolite script block or post it for investigate? Does the proxy for this function is presented in this block
    Last edited by geoffrey.mcgill; Feb 22, 2011 at 12:16 AM.
    Vladimir Shcheglov
    Sr. Developer
  5. #5

    RE: ajax method

    i got it working now by appending the ID of the user control to the client side call "Coolite.AjaxMethods.check();" to "Coolite.AjaxMethods.ucID.check();" . i did not make use of the AjaxMethodProxyID attribute but it is still working by just using the ID and not the client ID as mentioned. i don't know if it got something to do with that the javascript call to the AjaxMethod is in the same user control that contains the server side AjaxMethod. but thanks again for the reference

Similar Threads

  1. Passing parameter to Ajax Method
    By shijith in forum 1.x Help
    Replies: 1
    Last Post: Jul 26, 2010, 1:52 PM
  2. Replies: 2
    Last Post: Jan 09, 2010, 11:32 PM
  3. Ajax Method ??
    By heysol in forum 1.x Help
    Replies: 1
    Last Post: Sep 02, 2009, 1:15 PM
  4. calling ajax method from Javascript
    By vedagopal2004 in forum 1.x Help
    Replies: 1
    Last Post: Jan 21, 2009, 4:35 AM
  5. AJAX Method doesnt work
    By hbaraza in forum 1.x Help
    Replies: 1
    Last Post: Jan 15, 2009, 12:20 PM

Posting Permissions