29Jun/07
This blog has been neglected due to the success of Solidshops.com
submit an ajaxForm from a hyperlink
Below you can find the democode for submitting a form from an hyperlink.
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();
-
});
-
-
});
HTML:
-
</form></div>
When you click on the link to # with the id "submit_form" it will use the jQuery framework to the submit form code ($("#addusertorunningform").submit();).
Popularity: 2% [?]


