1. #1
    Ext User
    Join Date
    Jul 2008
    Posts
    43
    Vote Rating
    0
    Priyank014 is on a distinguished road

      0  

    Question missing : after property id

    missing : after property id


    Hi all,

    I'm trying to pass parameters to the Ext.Ajax.request in way described below

    params:{formPanel.form.getValues(),SelectId:elId}

    I'm getting the above error by firebug.

    Can someone help me out?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,018
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    It's not valid javascript. If you're defining an object, you have to do it like:

    Code:
    {
       name1: value1,
       name2: value2
    }
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Jul 2008
    Posts
    43
    Vote Rating
    0
    Priyank014 is on a distinguished road

      0  

    Default


    but i have so many fields in the form so, writing in that way would not be feasible.

  4. #4
    Ext User
    Join Date
    Jul 2008
    Posts
    43
    Vote Rating
    0
    Priyank014 is on a distinguished road

      0  

    Thumbs up


    Eventually I was able to solve it by using hidden field to store the value of extra parameter i.e SelectId

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    56
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Use Ext.apply to add extra properties to the getValues result object:

    Code:
        params: Ext.apply(formPanel.form.getValues(), {
            myExtraParam: 'myExtraValue',
            myOtherExtraParam, 'myOtherExtraValue'
        });

  6. #6
    Ext User
    Join Date
    Jul 2008
    Posts
    43
    Vote Rating
    0
    Priyank014 is on a distinguished road

      0  

    Thumbs up


    Thanks Animal,

    I'll try this also

Thread Participants: 2