Using bind()

Using bind()

Hi, I'm new to javascript and jquery. I was looking to use $(selector).bind() instead of using the ONCHANGE handler inline. Could some one help me out on how to use that in the following code. 
  1. <Script language="JavaScript">

  2. function goto(form) { var index=form.select.selectedIndex
  3. if (form.select.options[index].value != "0") {
  4. location=form.select.options[index].value;}}


  5. </script>

  6. <div id="select_student">
  7. <br />
  8. <br />
  9. <h2>Choose a Student:</h2>
  10. <form id="student_select" method="post">
  11. <select id="select" name="select" ONCHANGE="goto(this.form)" SIZE="1">
  12. <option selected="selected">---Select a Student---</option>
  13. <?php
  14. foreach ($students as $s) {
  15. echo ('<option  name="student_choice" value="https://secure.freteleven.com/lesson/get_student_lesson/'.$s->userid.'">'.$s->first_name.' '.$s->last_name.'</option>');
  16. }
  17. ?>
  18. </select>
  19. </form>

  20. <br />
  21. <br />

  22. </div>