Cheers for that
Object.toQueryString can be used instead I think, I'll try it out and see if I can get it to work.
I have this now:
Code:
function sendRequest() {
new Ajax.Request("appointments.php",
{
method: 'post',
postBody: toQueryString({
name: $F('name'),
date: $F('date'),
time: $F('time'),
where: $F('where'),
phone_no: $F('phone_no'),
job_desc: $F('job_desc'),
quoted_price: $F('quoted_price')
}),
onComplete: showResponse
});
}
But it's not working, what am I doing wrong?
Fixed it, used "parameters" instead:
Code:
function sendRequest() {
new Ajax.Request("appointments.php",
{
method: 'post',
parameters: {
name: $F('name'),
date: $F('date'),
time: $F('time'),
where: $F('where'),
phone_no: $F('phone_no'),
job_desc: $F('job_desc'),
quoted_price: $F('quoted_price')
},
onComplete: showResponse
});
}
Bookmarks