<form class="ajax" action="./?p=page#plugin_form_container" method="post">
var result = jQuery(this).attr('action').replace(/^.*#/,'#');
jQuery("form[class='ajax'] input[type='submit']").live('click',function(e) {
and
jQuery.post("ajax.php", f.serialize(), function(data) {
jQuery("form[class='ajax'] button[type='submit']").live('click',function(e) {
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("form[class='ajax'] input[type='submit']").live('click',function(e) {
var f = jQuery(this).parents('form:first');
f.submit(function() {
var result = jQuery(this).attr('action').replace(/^.*#/,'#');
jQuery.post("ajax.php", f.serialize(), function(data) {
jQuery(result).html(data);
});
return false;
});
});
});
</script>
<div id="plugin_form_container">
<form class="ajax" action="./?p=page#plugin_form_container" method="post">
<table width="100%">
<tr>
<td class="r">Test</td>
<td><input type="text" name="test" value="" size="45"></td>
</tr>
<tr>
<td></td>
<td>
<input type="hidden" name="p" value="plugin" />
<input type="hidden" name="m" value="module" />
<input type="hidden" name="a" value="add_record" />
<input type="submit" value="Submit" />
</td>
</table>
</form>
</div>
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (3)
Commented:
bol
Author
Commented:Commented: