Form With Multiple Submit Buttons Using Jquery
I have a form that has 3 submit buttons with 2 input fields. The first input field is a search field that allows the users to search against the database for certain names that are found and not found.
<form id="name_form" action="" method="POST">
<input type="text" name="q" />
<input type="button" id="search" name="Submit" value="Search"/> *(multiple search seperate with a comma)<br />
<input type="radio" name="type" value="found" checked>Show Found <input type="radio" name="type" value="notfound"/>Not Found
<script type="text/javascript">
$(document).ready(function() {
$('#search').click(function(event) {
$('#feed_keyword_deny').ajaxForm({
url: 'feed_search_submit.php',
success : function (data) {
$("#keywords").val(data);
}
});
});
});
</script>
the results are stored into a textarea
<textarea id="keywords" wrap="hard" cols="50" rows="5"></textarea>
you then have the option to add or remove these words based on your search
<p class="submit">
<input type="submit" id="add" value="Add" /> <input type="submit" id="remove" value="Remove" />
</p>
</form>
I am having an issue that when I click add or remove it is processing the "search" field. How can I make it a button instead?