Below you can find the democode for submitting a form from an hyperlink.
PLAIN TEXT
JavaScript:
$(document).ready(function() {
$('#addusertorunningform').ajaxForm({
target: '#add_user_to_running_status',
success: function() {
document.getElementById('add_user_to_running_status').style.display = 'block';}
});
$('a#submit_form').click(function() {
$("#addusertorunningform").submit();
});
});
PLAIN TEXT
HTML:
<div id="add_user_to_running_status">; <form id="addusertorunningform" action="http://domain.com/ajax/comment.php" name="addusertorunningform" method="post"> <input name="maptolink1" id="maptolink1" value="<? print $mapid; ?>" type="hidden" /> <a href="#" id="submit_form">test</a>
</form></div>
When you click on the link to # with the id "submit_form" it will [...]
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||