I have this AJAX request:
function request(str){
I think this code is broken:
Not sure that this will totally fix it but I think this is the right syntax:
I don't think this will solve your problem though but that syntax you were using wasn't formed right. I think instead of calling the function like this:
form();
You may also be interested in looking at .trigger() or .call(), I also looked at the jquery documentation and I have never seen .button(), what is that for?