How to control the tab key with onBlur

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

In my example the focus should only jump to textbox2 when you press the tab
key if '11' is in textbox1. If the value of textbox1 is not '11' than the
focus should be set back to textbox1. That works great in IE but in Mozilla
the cursor always jumps to textbox2 if you press the tab key even if the
value is not '11'.

      <script type = 'text/javascript'>

  function test(object) {
    if (object.value == 11) {
      return (true);
    else {
      return (false);

      <form name = "my_form" action = "" method = "post" accept-charset =
        <table id = "my_table" border = "1">
              <input type = "text" name = "my_textbox1" onBlur = 'if
              <input type = "text" name = "my_textbox2">

What do I do wrong?

Site Timeline