[jQuery] A Syntax question/problem

[jQuery] A Syntax question/problem


I have the following syntax problem ...
$("#search").bind("keypress", function(e) {
if (e.keyCode == 13) return false;
});
$('#search').change(function() {
var vKeyword = document.getElementById('search').value
$.ajax({
type: "GET",
...
The first little bit of code traps for a user striking the enter key
and cancels it (this prevents the page from submitting like a form).
The second code snippet is the beginning of an AJAX script to get
information based on a keyword value in a text field with an id of
"search" which triggers when the change event fires.
Both work perfectly ... but I would like to combine the two in such a
way as to trigger the AJAX script on both/either the change event or
the enter key - and still have the enter key NOT submit the page. I
just can't figure out how to do it in a syntactically tidy way ...
anybody have a suggestion?