Hi,
Most businesses in my area seem to prefer jQuery. As a matter of fact, when I look at job boards I never see Prototype. I am pretty much a beginner with javascript but I was able to use Prototype/Scriptaculous to do what I needed and learn a little javascript along the way. One thing that I absolutely need is a form post with a return.
I've decided to switch over to jQuery, since that seems to be where the industry is headed.
I've been able to get $.post to work. Pretty simple but I need Ajax and I can't figure out how to capture the return.
My Ajax post is below. I've been searching for days on how to capture the return data but I am clueless. Can someone tell me what is missing from the code below...basically how I set the function variable.
I want to replace the the existing id='bottom' with the results of my post.
function ajaxFormSubmit(process, method, url, target)
{
var serial_data = 'xhr=' + process + '&' + $("form").serialize();
$.ajax({
type: method,
url: url,
data: serial_data,
success: valid_signin(serial_data)
});
}
function valid_signin(data, seial_data)
{
alert("made it (serial_data): " + serial_data);
}