$.post() accepts a collection of name/value pairs, I don't think multi-dimensional arrays/objects work, so what you've already suggested:
$post('page.php',{name:'Joe',age:'24'},...); will work. - jake On 5/17/07, Brian Ronk <[EMAIL PROTECTED]> wrote:
This is actually probably more relevant to post() since I can concatenate the parameters with the link for getJSON(), but here we go anyway. I am pulling JSON information from the server for menu links, and then creating the menu off of that. Let's say that I have {page: 'update.php', linkname: 'Update Joe', vars: [{name: 'name', value: 'Joe'}, {name: 'age', value: '24'}]} as information that was returned for the link from the server (sorry if the JSON isn't quite right). If I were to put this directly in a link, it wouldn't be a problem, but since I am trying to put the info into a post() as parameters to pass to the server (the vars), I'm running into an issue of how to do it. I was toying with the idea of storing the values in an outside variable, and just use that in the call: post('update.php', varlist); I'm just not sure how that would work. The API info for getJSON and post both have params (Map) and it looks like JSON. I guess the problem is that I'm not sure what Map is, and how I should be using it. Should I shorten my vars to just: vars: {name: 'Joe', age: '24'} and use something like: post('update.php', json.vars)? (Where json is the JSON object that is returned).