JQuery Post not working

JQuery Post not working

I'm very new to JQuery and the following simple example is not working for me. It work fine in plain JavaScript AJAX.

Here is the JQuery:

  1. $(document).ready(function(){
  2.    
  3. var serverPage = "ObituaryDisplay.php";
  4. $('button').click(function(){
  5.     Tfirst = $("#txtFirst").val();
  6.     Tlast = $("#txtLast").val();
  7.     $.post("ObituaryDisplay.php", {first:Tfirst,last:Tlast}, function(result) {
  8.          $('#errdisplay').html(result);
  9.         });
  10.     });
  11. });
The server side is very simple PHP page.

  1. $input = "";
  2. if($input == "") {
  3.     echo "E:<h2 style='color:red'>Nothing entered.</h2>";
  4.     exit;
  5. }
And the target for the result, in main page is:

  1. <div id="errdisplay">&nbsp;</div>
What am I doing wrong?  I've looked at this for several hours, so it's obvious to me that I'm missing something very basic.

Thanks for the help