My form has an ajax handler provided by jquery.forms.js.
form.ajaxForm({
dataType: 'json',
clearForm: true,
success: function (data)
{
form.replaceWith(data);
}
});
I'm testing this using selenium (the python RC interface), and it works when I click() the button, but not when I submit the form:
locbase = "dom=document.forms[0]"
SEL.type(locbase + ".elements[0]", text)
SEL.select(locbase+".elements[2]", "label=%s" % username)
SEL.submit(locbase) # DOESNT WORK
SEL.click(locbase+".elements[3]") # WORK!
By "doesn't work", I mean that the form submits, but not via AJAX.
I guess this is a problem with the form. How can I tell (manually) that both my ajax is bound for both submitting the form and clicking on the button, and what do I have to do to make it work?