instead of using getParameterByName('Field', PostData) (PostData == $('form').serialize();)
I would like to write PostData.Field, how can i do that with javascript?
You could write your own extension to return an object like you want, here's what that looks like:
jQuery.fn.MakeIntoFields = function() {
var arr = this.serializeArray();
var props = {};
$.each(arr, function(i, f) {
props[f.name] = f.value;
});
return props;
};
You'd call it by doing this:
var PostData = $("form").MakeIntoFields();
Then you could access the values with dot notation like you want:
PostData.fieldNameHere
//or...
PostData["fieldNameHere"]
$('input[name=Field]').val()?