Hi folks,
I'm having difficulty getting the submit of a form, loaded into the
page from an AJAX call, being bound to a function. If my description
doesn't make sense, hopefully the following code will show what I'm on about:
function getSS(ej) {
$.ajax({
type: 'GET',
url: "scripts/ajax_ramosus_editor.asp?id=22d&showID=" + ej +
"&q=" + new Date().getTime(),
dataType: "html",
success: function(html){
$("#advMsg3").html(html).show();
var SS1options = {dataType: 'json', after: after_SS};
$('#ss1_form').submit(function(){$(this).ajaxSubmit(SS1options);return
false;});
}
});
};
The form (id=ss1_form) is loaded into the page from the ajax
call. However, the ajaxSubmit function is not being bound to the
form - when I subsequently submit the form, the page "moves" to the
file specified in the form's action tag.
What is my mistake?
Thanks,
Bruce
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/