Dialog Button submit .load() form

Dialog Button submit .load() form

Hey,

how can i manage it, that a Dialog Button submits a form, that is loaded via the .load() function? here is the code:

I tested $("#bearbeiten").submit(); (bearbeiten = form id)

  1.    function contentloaderBea(dataid) {
        $("#somedivs").load("Mieter.php?s=mbearbeiten&mieterid="+dataid+"").dialog({
            modal:true,
            autoOpen: false,
            title: 'Mieter Bearbeiten',
            position: 'center',
            width:'350',
            height:'600',
            buttons: {
                    "Speichern": function() {
                        $("#bearbeiten").submit();
                        $( this ).dialog( "close" );
                    },
                    "Abbrechen": function() {
                        $( this ).dialog( "close" );
                    }
                }
            });
      }

















HTML that is loaded:

  1. <form action="seiten/Mieter/Bearbeiten2.php" method="post" name="bearbeiten">
    .
    .
    .
    .
    .
    </form>





I have to load this Site, because it catches data from the server.

Kind regards,
lugaru