how manually pass extra parameters in ajax call rom JavaScript

  1. #1

    how manually pass extra parameters in ajax call rom JavaScript

    Hi,
    let say I'm having such server side handler:

    
    
    
    protected void MyButton_Click(object sender, AjaxEventArgs e)
    
    
    {
    
    
    ...
    
    
    }
    and want in it receive some extra parameters through e.ExtraParams. To invoke ajax call from client side, I'm using such call

    MyButton.ajaxEvents.click.fn.apply(MyButton, [??????]);
    and in place of ?????? want to pass some extra parameters. How can I do that?

    Thanks,
    Z.

  2. #2

    RE: how manually pass extra parameters in ajax call rom JavaScript

    Any ideas...?

    thanks,
    Z.
  3. #3

    RE: how manually pass extra parameters in ajax call rom JavaScript

    Seems that found solution myself. Maybe somebody else would be interested.
    Have investigated Extjs and Coolite code client side and seems (may be I'm wrong)
    that extra parameters could not be passed to call of if they are not defined in ASP AjaxEvents tag

    MyButton.ajaxEvents.click.fn.apply(MyButton, [??????]);
    because on client side script generation Coolite passes these extra parameters as arguments to function and uses it for server side call. But have found another way how to call that.

    Coolite.AjaxEvent.request(
                    {
                        extraParams:
                        {
                            param1: '121212',
                            param2: '34567'
                        },
                        formProxyArg: "form1",
                        viewStateMode: "include",
                        control: menuItem
                    });
    where formProxyArg contains form Id and control contains Control on what we want to fire event. In this example I'm using
    menu item and for click does not need to specify action. For example for calling Change event of DateField on server side, this action should be added: action:'Change'.

    Mybe I'm missing here something or missunderstood, would be great to hear some comments from gurus.
    Thanks.
    Z.

Similar Threads

  1. [CLOSED] Extra Parameters in Textfields
    By trezv in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 03, 2012, 3:24 PM
  2. Replies: 4
    Last Post: Apr 21, 2011, 6:04 AM
  3. [CLOSED] How to pass extra parameter on to TreeLoader
    By mxp in forum 1.x Legacy Premium Help
    Replies: 18
    Last Post: Mar 17, 2010, 2:40 PM
  4. Listener Fn - How can I pass extra parameters?
    By lionelhutz in forum 1.x Help
    Replies: 0
    Last Post: Dec 10, 2009, 5:25 PM
  5. Extra parameters Ajax Method from a Text Field
    By davromu in forum 1.x Help
    Replies: 4
    Last Post: Jun 17, 2009, 3:27 PM

Posting Permissions