title: AJAX call doesn't work after submitting a form
body: <p>This is my code at www.domain-a.de/external.search.js. I call it from  www.domain-b.de/test.php:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>(function ($) {
        // make the ajax request
        $.getJSON('http://www.domain-a.de/external-search.js?jsoncallback=?', function(data) {
          // append the form to the container
          $('#embedded_search').append(data);
          $('#embedded_search form').attr('action','');
  
          myUrl = 'http://www.domain-a.de/get-form-values?jsoncallback=?'
          var frm = $('#embedded_search form');
          
          // click on submit button
          frm.submit(function (ev) {  
            $.getJSON( myUrl )
              .done(function( json ) {
                console.log( "JSON Data: " + json );
              })
              .fail(function( jqxhr, textStatus, error ) {
                var err = textStatus + ", " + error;
                console.log( "Request Failed: " + err );
              });
          });    
        });      
  })(jQuery);</code></pre>
  </div>
  </div>
  </p>
  
  <p>After running this code I don't get any message in console. What is wrong with that code?</p>