Submiting a form from ajax outside the page (php)
Posted
by peter
on Stack Overflow
See other posts from Stack Overflow
or by peter
Published on 2009-08-03T19:46:08Z
Indexed on
2010/03/31
17:03 UTC
Read the original article
Hit count: 252
AJAX
hey i use jquery to insert a form into a div, the form is in a php file. function show(id){ var content = $("#layer1_content");
$("#layer1").show();
var targetUrl = "mouse.php?cat="+id;
content.load(targetUrl);
}
so everything works, but when i submit it goes too that php page, if i call the same form within the same php then it works fine. the response is handled by:
$('#layer1_form').ajaxForm({ target: '#content', success: function() { $("#layer1").hide(); } });
© Stack Overflow or respective owner