Is this the correct way to call my javascript function with jquery? I have spent the last 5 hours trying to figure out why this won't work.
<form class="rpt" id="rpt" action="">
$(function() {
  $("#rpt").submit(doSave);
});
</script>
Here is the small snippet of code in the javascript wysiwyg editor. I'm still using the exact same form tag in my html.
  // Save
  case "Save":
      WYSIWYG.updateTextArea(n);
      var form = WYSIWYG_Core.findParentNode("FORM", this.getEditor(n));
      if(form == null) {
       alert("Can not submit the content, because no form element found.");
       return;
      }
      form.submit();
  break;