HTML Form Doesn't Work in an Ajax Page

HTML Form Doesn't Work in an Ajax Page

I am loading one .php page inside another with ajax. The ajax-loaded page contains and html form:

  1. <form action="/book/aaa_testprice.php" method="post" target="_blank" id="booking" name="booking">
    <input name="ArrivalDate" id="ArrivalDate" class="datebox" size="10" onBlur="date_copy_set()" type="date">
    <input name="DepartureDate" id="DepartureDate" class="datebox" size="10" onFocus="date_copy()" type="date">
    <input name="hid" type="hidden" value="<?php echo $hid; ?>">
    <a href="javascript:void()" onclick="frames.booking.submit()" class="buttonPriceBook">Check Availability</a>
    </form>




aaa_testprice.php is just a little file that echoes $_POST['ArrivalDate'} to check if the form is working.

When I run the ajax-loaded file directly in the browser it works fine. When I use ajax to load it in another file, it doesn't send anything.

Originally the ajax-loaded file contained references to get external scripts, css and so on but I have now dropped those lines as they are also in the parent page. The problem is just the same either way.

This must be something elementary, but I just can't see it.