• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jquery-Ajax:- How to pass nested parameters

 
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

can some one tell me syntax to pass nested parameters to $.ajax ? following is my code

now question is how to i pass it to following $.ajax call ?

 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, but I'm not really sure what you are asking.
 
Praful Thakare
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok one more try

I call AutoText Function with following parameters,note queryString is nested parameter.

$("#AutoComplete").AutoText("getData.jsp",{minSearhChars:3,queryString:{accountKey:1,someKey:10}});

my AutoText functions looks like this



question is how do i pass the queryString to ajax call so that values of accountKey and somekey are passed to jsp.

I can hardcode it as data:{where:value,accountKey:queryString["accountKey"]..}

but i want it in plugin so needs a dynamic solution.

-P
 
Bear Bibeault
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still not sure, but are you asking how to merge the object in options.queryString with the object {where: value} so that all three parameters are submitted to the Ajax request?

If so, investigate the $.extend() utility function.
 
Praful Thakare
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my bad tats was dum question sorry for the confusion, yes $.extend was the option.
 
Bear Bibeault
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why was it a dumb question? I think not.
 
Praful Thakare
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
with so much time spent on jq i should have figured it out .

neways..

-P
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic