Chris,
The hash idea that the other site was talking about is what I was telling you in my previous post. I do this all the time:
function myFunction(email){
var args = {};
<a href="http://args.name">args.name</a> = $('#nameid').val();
args.location = $('#locationid').val();
args.email = email;
args.someStringLiteral = "I am a string!";
$.ajax({
url:"updatesql.php",
type:"post",
data: args,
error:function(){
alert('Failed');
},
<div id="1gxp" class="ArwC7c ckChnd">
success:function(){
alert('Success');
}</div> });
}
Note that in JavaScript what a hash (or what I would call a structure) is also an associative array, and it's an object, and both can be accessed using either dot or array notation. So if you had an object (hash/structure/associative array) called 'session' you could access the 'loggedin' property by saying session.loggedin or session['loggedin']. You could set up that hash/associative array/struct/object as I've mentioned above:
var session = {};
session.loggedin = true;
or
var session = {"loggedin":true};
Check this excellent page (<a href="http://www.quirksmode.org/js/associative.html">
http://www.quirksmode.org/js/associative.html</a>) for much more detailed information. :o)
jQuery will take an object like this and translate it into the "name=John&location=Boston" for you. I find passing an object of arguments easier and more preferable (personally) than passing "name=John&location=Boston".
Chris