[jQuery] using legacy form pages
I am attempting to retrofit my old frame based system with updated
ajax/jquery items.
Ideally I'd like to rewrite a lot of the old code to improve it, but in the
mean time I will need to have a working system.
One of the main issues I am experiencing is having form pages pop to the top
of pages and not remain in their assigned div tag.
For anchor tags this works great:
$('a').livequery('click',function(e){
e.preventDefault();
$.get($(this).attr("href"),{},function(data){
$("#rating").html(data);
})
})
I am trying to get the same behavior from the form submissions with :
$('form').livequery('submit', function(e){
e.preventDefault();
e.ajaxForm( {target: '#rating'} );
})
and I am getting nothing.
I assume it is the "e.preventDefault();" that is preventing submission, but
I'm not sure why the "e.ajaxForm( {target: '#rating'} );" doesn't take care
of it.
Is there a better/more standard way to perform form submissions from already
existing pages?
--
View this message in context: http://www.nabble.com/using-legacy-form-pages-tp21487932s27240p21487932.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.